Sequence Chart Studio  svn HEAD revision
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Private Member Functions | Private Attributes | List of all members
BMscIntervalSetComponentMatrix Class Reference

#include <time_pseudocode.h>

Inheritance diagram for BMscIntervalSetComponentMatrix:
Inheritance graph
Collaboration diagram for BMscIntervalSetComponentMatrix:
Collaboration graph

Public Member Functions

 BMscIntervalSetComponentMatrix (BMscPtr bmsc, bool causally=false, ChannelMapperPtr mapper=boost::shared_ptr< ChannelMapper >())
 Creates BMscIntervalSetComponentMatrix for given BMsc. After buildup, the interval set in resulting component matrix corresponding to pair of events e and e' is intersection of following: [0] if e == e' [0,infty) or (-infty,0] if events e,e' are ordered via visual (when causally is false) or causal order (when causally is true) interval sets from time relations in the bmsc corresponding to events e,e'. More...
 
const unsigned get_number (EventP e)
 return position of the event in the matrix More...
 
MscTimeIntervalSetDoperator() (EventP a, EventP b)
 return reference to interval set for events a,b (works only if the events x and y are in the same component or the matrix is not builded yet) More...
 
MscTimeIntervalSetDoperator() (const unsigned int a, const unsigned int b)
 return reference to interval set on position a,b (works only if the events x and y are in the same component or the matrix is not builded yet) More...
 
const MscTimeIntervalSetD get_element (const unsigned int x, const unsigned int y) const
 returns correct interval set on positions x and y, works only if the component matrix is builded More...
 
const MscTimeIntervalSetD get_element (EventP a, EventP b)
 returns correct interval set for events a and b, works only if the component matrix is builded More...
 
void triangulate ()
 
BMscIntervalSetComponentMatrixoperator= (const IntervalSetComponentMatrix &matrix)
 
const EventPVector get_events () const
 return all events in matrix More...
 
BMscPtr get_modified_bmsc (unsigned component, IntervalMatrix matrix)
 Takes matrix and component number and changes bmsc. If no matrix is presented, it fills the BMSC according to this (component) matrix. More...
 
BMscPtr get_modified_bmsc ()
 uses stored values of time relations in matrix(which could be modified) and returns modified bmsc More...
 
BMscPtr get_modified_bmsc (IntervalSetComponentMatrix matrix)
 uses stored values of time relations in matrix and returns modified bmsc More...
 
BMscPtr get_original_bmsc () const
 return original bmsc (assigned to the matrix) More...
 
virtual ~BMscIntervalSetComponentMatrix ()
 
void fill_intersection (EventP x, EventP y, const MscTimeIntervalSetD &c)
 
void fill (EventP x, EventP y, const MscTimeIntervalSetD &c)
 puts interval set into the matrix to the position of events x,y and also it's inverse to inverse position (works only if the events x and y are in the same component or the matrix is not builded yet) More...
 
void build_up ()
 builds up the component matrix according to bmsc and added interval sets More...
 
bool is_present (EventP event)
 returns true if the event is present in matrix, otherwise returns false More...
 
const std::list< TimeRelation * > get_rel_empty_set ()
 goes through the map of time relations tied to the cells and checks whether the interval set isn't empty, returns list of those relations More...
 
void tie_rel_to_cell (TimeRelationPtr relation, EventP i, EventP j)
 ties time relation to the cell More...
 
std::map< TimeRelation
*, std::pair< EventP, EventP > > 
get_tied_time_relations ()
 
const void add_event_to_component (EventP original_event, EventP added_event)
 Add event to the component matrix- adds added_event to same component as original_event. More...
 
- Public Member Functions inherited from IntervalSetComponentMatrix
void add_value (const unsigned int x, const unsigned int y)
 works only if the indices x and y are in the same component More...
 
void set_values (IntervalSetComponentMatrix &matrix)
 
void triangulate ()
 
 IntervalSetComponentMatrix ()
 
const unsigned int get_size () const
 
const unsigned get_number_of_components () const
 returns number of components More...
 
std::pair< unsigned int,
unsigned int > 
get_component_index (const unsigned int x) const
 for given element on index x in component matrix returns pair (component index, index of element in this component) More...
 
int in_same_component (const unsigned x, const unsigned y, const unsigned component_x, const unsigned offset_x)
 if the indices are in the same component return offset of the component, else return -1 More...
 
MscTimeIntervalSetDoperator() (const unsigned int x, const unsigned int y)
 works only if the indices x and y are in the same component More...
 
const MscTimeIntervalSetD get_element (const unsigned int x, const unsigned int y) const
 returns element on the position x,y More...
 
void push_back_component (IntervalSetMatrix &matrix)
 adds new component as last component More...
 
void print () const
 
void set_component (unsigned i, IntervalSetMatrix matrix)
 
IntervalSetMatrixget_component (unsigned i)
 returns the i-th component More...
 
IntervalSetMatrix get_component (unsigned i) const
 returns the i-th component More...
 
unsigned get_component_size (unsigned i) const
 returns the size of the i-th component More...
 
unsigned get_offset (unsigned index) const
 returns offset for indices in component on index index More...
 

Private Member Functions

void build_up_matrix ()
 Vector of all events in matrix. More...
 
void cleanup_attributes ()
 
void fill_intersection_directly (EventP x, EventP y, const MscTimeIntervalSetD &c)
 

Private Attributes

BMscPtr m_bmsc_original
 
bool m_builded
 
bool m_casually
 
ChannelMapperPtr m_mapper
 
std::map< EventP, EventPm_filled_positions
 
std::map< std::pair< EventP,
EventP >, MscTimeIntervalSetD
m_position_to_interval
 
std::map< TimeRelation
*, std::pair< EventP, EventP > > 
m_rel_to_position
 
std::map< EventP, unsigned > m_event_to_number
 
std::map< EventP, EventPm_event_to_bmsc_event
 the number of event in the matrix More...
 
std::map< EventP, EventPm_bmsc_event_to_event
 
EventPVector m_events
 

Detailed Description

Definition at line 931 of file time_pseudocode.h.

Constructor & Destructor Documentation

BMscIntervalSetComponentMatrix::BMscIntervalSetComponentMatrix ( BMscPtr  bmsc,
bool  causally = false,
ChannelMapperPtr  mapper = boost::shared_ptr<ChannelMapper>() 
)
inline

Creates BMscIntervalSetComponentMatrix for given BMsc. After buildup, the interval set in resulting component matrix corresponding to pair of events e and e' is intersection of following: [0] if e == e' [0,infty) or (-infty,0] if events e,e' are ordered via visual (when causally is false) or causal order (when causally is true) interval sets from time relations in the bmsc corresponding to events e,e'.

Definition at line 981 of file time_pseudocode.h.

virtual BMscIntervalSetComponentMatrix::~BMscIntervalSetComponentMatrix ( )
inlinevirtual

Definition at line 1085 of file time_pseudocode.h.

Member Function Documentation

const void BMscIntervalSetComponentMatrix::add_event_to_component ( EventP  original_event,
EventP  added_event 
)
inline

Add event to the component matrix- adds added_event to same component as original_event.

adds maximaly one event to the event originally in BMSC (other events than the last one will not be added) no event is added if original_event is not in m_bmsc_original

Definition at line 1189 of file time_pseudocode.h.

Referenced by HMscConsistencyChecker::on_path_found(), and HMscTighter::tighten_BMscGraph_path().

void BMscIntervalSetComponentMatrix::build_up ( )
inline

builds up the component matrix according to bmsc and added interval sets

Definition at line 1124 of file time_pseudocode.h.

Referenced by TimeRaceChecker::check(), ConsistencyChecker::check(), check_time_relative_mode(), HMscConsistencyChecker::on_path_found(), HMscTighter::tighten_BMscGraph_path(), and BMscTighter::transform().

void BMscIntervalSetComponentMatrix::build_up_matrix ( )
private
void BMscIntervalSetComponentMatrix::cleanup_attributes ( void  )
inlineprivate

Definition at line 954 of file time_pseudocode.h.

void BMscIntervalSetComponentMatrix::fill ( EventP  x,
EventP  y,
const MscTimeIntervalSetD c 
)
inline

puts interval set into the matrix to the position of events x,y and also it's inverse to inverse position (works only if the events x and y are in the same component or the matrix is not builded yet)

Definition at line 1110 of file time_pseudocode.h.

References MscTimeIntervalSet< double >::interval_inverse(), and IntervalSetComponentMatrix::operator()().

Referenced by HMscConsistencyChecker::on_path_found(), and HMscTighter::tighten_BMscGraph_path().

void BMscIntervalSetComponentMatrix::fill_intersection ( EventP  x,
EventP  y,
const MscTimeIntervalSetD c 
)
inline

puts IntervalSet in to the component matrix to the position of events x,y, if it was not set before otherwise it puts there the intersection with previously set value works only if the events x and y are in the same component or the matrix is not builded yet

Definition at line 1094 of file time_pseudocode.h.

References MscTimeIntervalSet< double >::set_intersection().

Referenced by check_time_relative_mode(), HMscConsistencyChecker::on_path_found(), and HMscTighter::tighten_BMscGraph_path().

void BMscIntervalSetComponentMatrix::fill_intersection_directly ( EventP  x,
EventP  y,
const MscTimeIntervalSetD c 
)
inlineprivate

puts the intersection of IntervalSet c with previously set value of the component matrix in the position of events x,y to this position

Definition at line 963 of file time_pseudocode.h.

References MscTimeIntervalSet< double >::set_intersection().

Referenced by build_up_matrix().

const MscTimeIntervalSetD BMscIntervalSetComponentMatrix::get_element ( const unsigned int  x,
const unsigned int  y 
) const
inline

returns correct interval set on positions x and y, works only if the component matrix is builded

Definition at line 1016 of file time_pseudocode.h.

References IntervalSetComponentMatrix::get_element().

const MscTimeIntervalSetD BMscIntervalSetComponentMatrix::get_element ( EventP  a,
EventP  b 
)
inline

returns correct interval set for events a and b, works only if the component matrix is builded

Definition at line 1025 of file time_pseudocode.h.

References IntervalSetComponentMatrix::get_element().

const EventPVector BMscIntervalSetComponentMatrix::get_events ( ) const
inline
BMscPtr BMscIntervalSetComponentMatrix::get_modified_bmsc ( unsigned  component,
IntervalMatrix  matrix 
)

Takes matrix and component number and changes bmsc. If no matrix is presented, it fills the BMSC according to this (component) matrix.

Definition at line 371 of file time_pseudocode.cpp.

References IntervalSetComponentMatrix::get_component(), get_number(), IntervalSetComponentMatrix::get_offset(), m_bmsc_original, m_rel_to_position, and IntervalSetMatrix::size().

Referenced by ConsistencyChecker::check(), and BMscTighter::transform().

BMscPtr BMscIntervalSetComponentMatrix::get_modified_bmsc ( )

uses stored values of time relations in matrix(which could be modified) and returns modified bmsc

Definition at line 389 of file time_pseudocode.cpp.

References BMscDuplicator::duplicate_bmsc(), Duplicator::get_copy(), m_bmsc_original, and m_rel_to_position.

BMscPtr BMscIntervalSetComponentMatrix::get_modified_bmsc ( IntervalSetComponentMatrix  matrix)

uses stored values of time relations in matrix and returns modified bmsc

Definition at line 405 of file time_pseudocode.cpp.

References BMscDuplicator::duplicate_bmsc(), Duplicator::get_copy(), get_number(), m_bmsc_original, and m_rel_to_position.

const unsigned BMscIntervalSetComponentMatrix::get_number ( EventP  e)
inline

return position of the event in the matrix

Definition at line 989 of file time_pseudocode.h.

Referenced by build_up_matrix(), TimeRaceChecker::check(), get_modified_bmsc(), CheckTimeTraceRaceListener::on_path_found(), and HMscTighter::on_path_found().

BMscPtr BMscIntervalSetComponentMatrix::get_original_bmsc ( ) const
inline

return original bmsc (assigned to the matrix)

Definition at line 1080 of file time_pseudocode.h.

Referenced by CheckTimeTraceRaceListener::on_path_found().

const std::list<TimeRelation*> BMscIntervalSetComponentMatrix::get_rel_empty_set ( )
inline

goes through the map of time relations tied to the cells and checks whether the interval set isn't empty, returns list of those relations

Definition at line 1138 of file time_pseudocode.h.

References IntervalSetComponentMatrix::get_element(), and MscTimeIntervalSet< T >::is_empty().

Referenced by ConsistencyChecker::check(), HMscConsistencyChecker::on_path_found(), and HMscTighter::tighten_BMscGraph_path().

std::map<TimeRelation*, std::pair<EventP,EventP> > BMscIntervalSetComponentMatrix::get_tied_time_relations ( )
inline
bool BMscIntervalSetComponentMatrix::is_present ( EventP  event)
inline

returns true if the event is present in matrix, otherwise returns false

Definition at line 1132 of file time_pseudocode.h.

MscTimeIntervalSetD& BMscIntervalSetComponentMatrix::operator() ( EventP  a,
EventP  b 
)
inline

return reference to interval set for events a,b (works only if the events x and y are in the same component or the matrix is not builded yet)

Definition at line 996 of file time_pseudocode.h.

References IntervalSetComponentMatrix::operator()().

MscTimeIntervalSetD& BMscIntervalSetComponentMatrix::operator() ( const unsigned int  a,
const unsigned int  b 
)
inline

return reference to interval set on position a,b (works only if the events x and y are in the same component or the matrix is not builded yet)

Definition at line 1007 of file time_pseudocode.h.

References IntervalSetComponentMatrix::operator()().

BMscIntervalSetComponentMatrix& BMscIntervalSetComponentMatrix::operator= ( const IntervalSetComponentMatrix matrix)
inline
void BMscIntervalSetComponentMatrix::tie_rel_to_cell ( TimeRelationPtr  relation,
EventP  i,
EventP  j 
)
inline

ties time relation to the cell

Definition at line 1154 of file time_pseudocode.h.

Referenced by HMscConsistencyChecker::on_path_found(), and HMscTighter::tighten_BMscGraph_path().

void BMscIntervalSetComponentMatrix::triangulate ( )
inline

Member Data Documentation

std::map<EventP,EventP> BMscIntervalSetComponentMatrix::m_bmsc_event_to_event
private

Definition at line 948 of file time_pseudocode.h.

Referenced by build_up_matrix().

BMscPtr BMscIntervalSetComponentMatrix::m_bmsc_original
private

Definition at line 934 of file time_pseudocode.h.

Referenced by build_up_matrix(), and get_modified_bmsc().

bool BMscIntervalSetComponentMatrix::m_builded
private

Definition at line 935 of file time_pseudocode.h.

Referenced by build_up_matrix().

bool BMscIntervalSetComponentMatrix::m_casually
private

Definition at line 937 of file time_pseudocode.h.

Referenced by build_up_matrix().

std::map<EventP,EventP> BMscIntervalSetComponentMatrix::m_event_to_bmsc_event
private

the number of event in the matrix

Definition at line 947 of file time_pseudocode.h.

Referenced by build_up_matrix().

std::map<EventP,unsigned> BMscIntervalSetComponentMatrix::m_event_to_number
private

Definition at line 945 of file time_pseudocode.h.

Referenced by build_up_matrix().

EventPVector BMscIntervalSetComponentMatrix::m_events
private

Definition at line 950 of file time_pseudocode.h.

Referenced by build_up_matrix().

std::map<EventP,EventP> BMscIntervalSetComponentMatrix::m_filled_positions
private

Definition at line 940 of file time_pseudocode.h.

ChannelMapperPtr BMscIntervalSetComponentMatrix::m_mapper
private

Definition at line 938 of file time_pseudocode.h.

Referenced by build_up_matrix().

std::map<std::pair<EventP,EventP>, MscTimeIntervalSetD> BMscIntervalSetComponentMatrix::m_position_to_interval
private

Definition at line 942 of file time_pseudocode.h.

Referenced by build_up_matrix().

std::map<TimeRelation*, std::pair<EventP,EventP> > BMscIntervalSetComponentMatrix::m_rel_to_position
private

Definition at line 944 of file time_pseudocode.h.

Referenced by build_up_matrix(), and get_modified_bmsc().


The documentation for this class was generated from the following files:

SourceForge.net Logo
Generated on Fri Jan 15 2016 16:26:57 for Sequence Chart Studio by  doxygen