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
BMscIntervalSetMatrix Class Reference

#include <time_pseudocode.h>

Inheritance diagram for BMscIntervalSetMatrix:
Inheritance graph
Collaboration diagram for BMscIntervalSetMatrix:
Collaboration graph

Public Member Functions

 BMscIntervalSetMatrix (BMscPtr bmsc, bool causally=false, ChannelMapperPtr mapper=boost::shared_ptr< ChannelMapper >())
 Creates BMscIntervalSetMatrix for given BMsc. The interval set in the place at resulting 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 cuasal is false) or causal order (when causal is true) interval sets from time relations from 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)
 if matrix was builded -> return reference from matrix, else return reference from map More...
 
MscTimeIntervalSetDoperator() (const unsigned int a, const unsigned int b)
 
BMscIntervalSetMatrixoperator= (const BMscIntervalSetMatrix &matrix)
 
BMscIntervalSetMatrixoperator= (const IntervalSetMatrix &matrix)
 
BMscIntervalSetMatrixoperator= (const IntervalMatrix &matrix)
 
const EventPVector get_events () const
 return all events in matrix More...
 
const unsigned get_size () const
 
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 (IntervalMatrix *matrix)
 Takes (modified) matrix and changes bmsc. If no matrix is presented, it fills the BMSC according to this matrix. More...
 
BMscPtr get_original_bmsc () const
 return original bmsc (assigned to the matrix) More...
 
virtual ~BMscIntervalSetMatrix ()
 
void fill_intersection (EventP x, EventP y, const MscTimeIntervalSetD &c)
 
void fill (EventP x, EventP y, const MscTimeIntervalSetD &c)
 puts IntervalSet in to the matrix to the position of events x,y More...
 
void fill (const unsigned x, const unsigned y, const MscTimeIntervalSetD &c)
 
void build_up ()
 
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...
 
const std::list< std::pair
< unsigned, unsigned > > 
get_empty_set ()
 
void tied_rel_to_cell (TimeRelationPtr relation, const unsigned i, const unsigned j)
 ties time relation to the cell More...
 
void tied_rel_to_cell (TimeRelationPtr relation, EventP i, EventP j)
 
std::map< TimeRelation
*, std::pair< unsigned,
unsigned > > 
get_tied_time_relations ()
 
const unsigned add_event (EventP event)
 add event to the matrix (adding new row and column), returns column/row number in matrix More...
 
- Public Member Functions inherited from IntervalSetMatrix
void triangulate ()
 
unsigned get_size_of_values ()
 
void set_values (std::vector< std::set< unsigned > > val)
 
std::vector< std::set< unsigned > > get_values () const
 
std::vector< std::set< unsigned > > get_values ()
 
void clear_values ()
 
void add_value (const unsigned i, const unsigned j)
 
bool is_filled (unsigned i, unsigned j) const
 
bool not_filled (unsigned i, unsigned j) const
 
 IntervalSetMatrix ()
 
 IntervalSetMatrix (unsigned size)
 
 IntervalSetMatrix (const IntervalSetMatrix &matrix)
 
void fill (const unsigned int x, const unsigned int y, const MscTimeIntervalSetD &c)
 adding to the matrix-set INTERVAL SET c to (x,y) and its inverse to (y,x) More...
 
void fill (const unsigned x, const unsigned y, const MscTimeIntervalD &c)
 adding to the matrix-set INTERVAL c to (x,y) and its inverse to (y,x) More...
 
void resize (unsigned int i, bool preserved)
 
IntervalSetMatrixoperator= (const IntervalSetMatrix &matrix)
 
IntervalSetMatrixoperator= (const IntervalMatrix &matrix)
 
MscTimeIntervalSetDoperator() (unsigned int x, unsigned int y)
 
const MscTimeIntervalSetDoperator() (unsigned int x, unsigned int y) const
 
const unsigned int size () const
 
const
BoostIntervalSetMatrix::iterator1 
begin1 ()
 
const
BoostIntervalSetMatrix::iterator1 
end1 ()
 
void print () const
 

Private Member Functions

void build_up_matrix ()
 Vector of all events: event=matrix[number]. More...
 
void cleanup_attributes ()
 

Private Attributes

BMscPtr m_bmsc_original
 
unsigned m_size
 
bool m_builded
 
bool m_casually
 
ChannelMapperPtr m_mapper
 
std::map< unsigned, unsigned > m_filled_positions
 
std::map< std::pair< unsigned,
unsigned >
, MscTimeIntervalSetD
m_position_to_interval
 
std::map< TimeRelation
*, std::pair< unsigned,
unsigned > > 
m_rel_to_position
 
std::map< EventPtr, unsigned > m_event_to_number
 
EventPVector m_events
 the number of event in the matrix //TODO check with Ondra whether correct More...
 

Detailed Description

Definition at line 660 of file time_pseudocode.h.

Constructor & Destructor Documentation

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

Creates BMscIntervalSetMatrix for given BMsc. The interval set in the place at resulting 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 cuasal is false) or causal order (when causal is true) interval sets from time relations from the BMsc corresponding to events e,e'.

Definition at line 697 of file time_pseudocode.h.

References EventTopologyHandler::causal_is_leq(), EventFirstSuccessors::get(), EventTopologyHandler::get_topology(), EventTopologyHandler::init_causal(), IntervalSetMatrix::operator()(), MscTimeIntervalSet< double >::set_intersection(), and EventTopologyHandler::visual_is_leq().

virtual BMscIntervalSetMatrix::~BMscIntervalSetMatrix ( )
inlinevirtual

Definition at line 836 of file time_pseudocode.h.

Member Function Documentation

const unsigned BMscIntervalSetMatrix::add_event ( EventP  event)
inline

add event to the matrix (adding new row and column), returns column/row number in matrix

Definition at line 921 of file time_pseudocode.h.

void BMscIntervalSetMatrix::build_up ( )
inline

Definition at line 870 of file time_pseudocode.h.

void BMscIntervalSetMatrix::build_up_matrix ( )
private

Vector of all events: event=matrix[number].

initialization of visual closure

Definition at line 20 of file time_pseudocode.cpp.

References fill(), m_builded, m_position_to_interval, m_size, operator()(), and IntervalSetMatrix::resize().

void BMscIntervalSetMatrix::cleanup_attributes ( void  )
inlineprivate

Definition at line 683 of file time_pseudocode.h.

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

puts IntervalSet in to the matrix to the position of events x,y

Definition at line 859 of file time_pseudocode.h.

References IntervalSetMatrix::fill().

Referenced by build_up_matrix().

void BMscIntervalSetMatrix::fill ( const unsigned  x,
const unsigned  y,
const MscTimeIntervalSetD c 
)
inline
void BMscIntervalSetMatrix::fill_intersection ( EventP  x,
EventP  y,
const MscTimeIntervalSetD c 
)
inline

puts IntervalSet in to the matrix to the position of events x,y, if it was not set before otherwise it puts there the intersection with previously set value

Definition at line 844 of file time_pseudocode.h.

References IntervalSetMatrix::fill(), and MscTimeIntervalSet< double >::set_intersection().

const std::list<std::pair<unsigned,unsigned> > BMscIntervalSetMatrix::get_empty_set ( )
inline

Definition at line 891 of file time_pseudocode.h.

References IntervalSetMatrix::size().

const EventPVector BMscIntervalSetMatrix::get_events ( ) const
inline

return all events in matrix

Definition at line 813 of file time_pseudocode.h.

BMscPtr BMscIntervalSetMatrix::get_modified_bmsc ( )

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

Definition at line 355 of file time_pseudocode.cpp.

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

BMscPtr BMscIntervalSetMatrix::get_modified_bmsc ( IntervalMatrix matrix)

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

Definition at line 340 of file time_pseudocode.cpp.

References m_bmsc_original, and m_rel_to_position.

const unsigned BMscIntervalSetMatrix::get_number ( EventP  e)
inline

return position of the event in the matrix

Definition at line 770 of file time_pseudocode.h.

BMscPtr BMscIntervalSetMatrix::get_original_bmsc ( ) const
inline

return original bmsc (assigned to the matrix)

Definition at line 831 of file time_pseudocode.h.

const std::list<TimeRelation*> BMscIntervalSetMatrix::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 879 of file time_pseudocode.h.

const unsigned BMscIntervalSetMatrix::get_size ( ) const
inline

Definition at line 819 of file time_pseudocode.h.

std::map<TimeRelation*, std::pair<unsigned,unsigned> > BMscIntervalSetMatrix::get_tied_time_relations ( )
inline

Definition at line 914 of file time_pseudocode.h.

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

if matrix was builded -> return reference from matrix, else return reference from map

Definition at line 779 of file time_pseudocode.h.

References IntervalSetMatrix::operator()().

Referenced by build_up_matrix().

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

Definition at line 785 of file time_pseudocode.h.

References IntervalSetMatrix::operator()().

BMscIntervalSetMatrix& BMscIntervalSetMatrix::operator= ( const BMscIntervalSetMatrix matrix)
inline

Definition at line 793 of file time_pseudocode.h.

References m_bmsc_original, and IntervalSetMatrix::operator=().

BMscIntervalSetMatrix& BMscIntervalSetMatrix::operator= ( const IntervalSetMatrix matrix)
inline

Definition at line 801 of file time_pseudocode.h.

References IntervalSetMatrix::operator=().

BMscIntervalSetMatrix& BMscIntervalSetMatrix::operator= ( const IntervalMatrix matrix)
inline

Definition at line 807 of file time_pseudocode.h.

References IntervalSetMatrix::operator=().

void BMscIntervalSetMatrix::tied_rel_to_cell ( TimeRelationPtr  relation,
const unsigned  i,
const unsigned  j 
)
inline

ties time relation to the cell

Definition at line 904 of file time_pseudocode.h.

void BMscIntervalSetMatrix::tied_rel_to_cell ( TimeRelationPtr  relation,
EventP  i,
EventP  j 
)
inline

Definition at line 909 of file time_pseudocode.h.

Member Data Documentation

BMscPtr BMscIntervalSetMatrix::m_bmsc_original
private

Definition at line 663 of file time_pseudocode.h.

Referenced by get_modified_bmsc(), and operator=().

bool BMscIntervalSetMatrix::m_builded
private

Definition at line 665 of file time_pseudocode.h.

Referenced by build_up_matrix().

bool BMscIntervalSetMatrix::m_casually
private

Definition at line 667 of file time_pseudocode.h.

std::map<EventPtr,unsigned> BMscIntervalSetMatrix::m_event_to_number
private

Definition at line 675 of file time_pseudocode.h.

EventPVector BMscIntervalSetMatrix::m_events
private

the number of event in the matrix //TODO check with Ondra whether correct

Definition at line 677 of file time_pseudocode.h.

std::map< unsigned,unsigned> BMscIntervalSetMatrix::m_filled_positions
private

Definition at line 670 of file time_pseudocode.h.

ChannelMapperPtr BMscIntervalSetMatrix::m_mapper
private

Definition at line 668 of file time_pseudocode.h.

std::map<std::pair<unsigned,unsigned>, MscTimeIntervalSetD> BMscIntervalSetMatrix::m_position_to_interval
private

Definition at line 672 of file time_pseudocode.h.

Referenced by build_up_matrix().

std::map<TimeRelation*, std::pair<unsigned,unsigned> > BMscIntervalSetMatrix::m_rel_to_position
private

Definition at line 674 of file time_pseudocode.h.

Referenced by get_modified_bmsc().

unsigned BMscIntervalSetMatrix::m_size
private

Definition at line 664 of file time_pseudocode.h.

Referenced by build_up_matrix().


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