latest version v1.9 - last update 10 Apr 2010 |
Entry type used in the sparse matrix representing the affinity matrix. More...
#include <ltiAdjacencyGraph.h>
Public Types | |
typedef std::map< id_type, typename adjacencyGraph< N, W, D, F, E >::entry_type > ::iterator | entry_iterator |
Public Member Functions | |
entry_type () | |
entry_type (const typename queue_type::index_type &idx, const edge_data_type &dta=edge_data_type(), const entry_iterator &it=entry_iterator()) | |
entry_type (const entry_type &other) | |
entry_type & | setIndex (const typename queue_type::index_type &idx) |
entry_type & | operator= (const entry_type &other) |
Public Attributes | |
queue_type::index_type | index |
edge_data_type | data |
entry_iterator | complement |
Entry type used in the sparse matrix representing the affinity matrix.
The entry contains an attribute index to access the weight of the corresponding edge in the priority queue and additional information of type data_type.
typedef std::map<id_type, typename adjacencyGraph<N,W,D,F,E>::entry_type>::iterator lti::adjacencyGraph< N, W, D, F, E >::entry_type::entry_iterator |
Type to point to another entry.
lti::adjacencyGraph< N, W, D, F, E >::entry_type::entry_type | ( | ) | [inline] |
default constructor
lti::adjacencyGraph< N, W, D, F, E >::entry_type::entry_type | ( | const typename queue_type::index_type & | idx, | |
const edge_data_type & | dta = edge_data_type() , |
|||
const entry_iterator & | it = entry_iterator() | |||
) | [inline] |
construct with given values
lti::adjacencyGraph< N, W, D, F, E >::entry_type::entry_type | ( | const entry_type & | other | ) | [inline] |
copy constructor
entry_type& lti::adjacencyGraph< N, W, D, F, E >::entry_type::operator= | ( | const entry_type & | other | ) | [inline] |
entry_type& lti::adjacencyGraph< N, W, D, F, E >::entry_type::setIndex | ( | const typename queue_type::index_type & | idx | ) | [inline] |
change the index and return a reference to this entry
References lti::adjacencyGraph< N, W, D, F, E >::entry_type::index.
entry_iterator lti::adjacencyGraph< N, W, D, F, E >::entry_type::complement |
Iterator to the complement of this entry.
If this entry belongs to the ids (i,j), then the complement has the ids (j,i).
The use of this iterator saves time computing the position of the complement, which is in manipulation operations required (like merge or remove).
This is possible considering that map has the important property that inserting a new element into a map does not invalidate iterators that point to existing elements. Erasing an element from a map also does not invalidate any iterators, except, of course, for iterators that actually point to the element that is being erased.
Referenced by lti::adjacencyGraph< N, W, D, F, E >::entry_type::operator=().
edge_data_type lti::adjacencyGraph< N, W, D, F, E >::entry_type::data |
The data contains information relevant for the two regions to which this entry belongs.
It can be for example the length of the common border, or the distance between the colors of the boundaries.
Referenced by lti::adjacencyGraph< N, W, D, F, E >::entry_type::operator=().
queue_type::index_type lti::adjacencyGraph< N, W, D, F, E >::entry_type::index |
Index of this entry in the priority queue.
Referenced by lti::adjacencyGraph< N, W, D, F, E >::entry_type::operator=(), and lti::adjacencyGraph< N, W, D, F, E >::entry_type::setIndex().