|
Developer Documentation |
|
Centre for Vision, Speech & Signal Processing |
Comments:
Iterates through the edges in a graph.
Parent Classes:
Typedefs:
- typedef GraphEdgeDatC<EdgeT> EdgeDatT;
-
Methods:
- GraphEdgeIterC(GraphTC<NodeT,EdgeT> & AGraph)
-
Constructor.
- GraphEdgeIterC()
-
Default Constructor.
- GraphEdgeIterC(const GraphEdgeIterC<NodeT,EdgeT> & Another)
-
- ~GraphEdgeIterC()
-
Destructor.
- const GraphEdgeIterC<NodeT,EdgeT> & operator=(const GraphEdgeIterC<NodeT,EdgeT> & Oth)
-
Assigment.
- BooleanT operator==(const GraphEdgeIterC<NodeT,EdgeT> & Oth) const
-
Comparison.
- EdgeT & Data(void)
-
Access data.
- const EdgeT & Data(void) const
-
Access data.
- GraphNodeIterC<NodeT,EdgeT> Node1(void)
-
Get a node from an undirected graph
- GraphNodeIterC<NodeT,EdgeT> Node2(void)
-
Get a node from an undirected graph
- NodeT & Node1Data(void)
-
Get data from node 1.
- NodeT & Node2Data(void)
-
Get data from node 2.
- NodeT & SourceData(void)
-
Data from source node.
- NodeT & TargetData(void)
-
Data from target node.
- GraphNodeIterC<NodeT,EdgeT> Source(void)
-
Get source node iter.
- GraphNodeIterC<NodeT,EdgeT> Target(void)
-
Get target node iter.
- GraphNodeHC<NodeT,EdgeT> SourceH(void)
-
Get source node handle.
- GraphNodeHC<NodeT,EdgeT> TargetH(void)
-
Get target node handle.
- void First()
-
- void Last()
-
- void Next()
-
- void Prev()
-
- void NextCrc()
-
- void PrevCrc()
-
- void Nth(LongIntT n)
-
- void RelNth(LongIntT n)
-
- BooleanT IsValid() const
-
TBD. Tempory solution !! While IsValid is protected.
- BaseDListC::ListSizeT Size() const
-
- void Invalidate()
-
Invalidate handle, IsValid() will return false after this
call until the handle is assigmed to another edge.
- void Del()
-
Unlinks edge from the graph and deletes it. The iterator
will point to the previous edge in the graph edge list.
- BooleanT IsEdgeValid() const
-
- BooleanT IsIterValid() const
-
- GraphNodeDatC<NodeT,EdgeT> & SourceRep(void)
-
Get source node.
- GraphNodeDatC<NodeT,EdgeT> & TargetRep(void)
-
Get target node repre.
- GraphEdgeDatC<EdgeT> & EdgeDat()
-
Get a edge rep.
- const GraphEdgeDatC<EdgeT> & EdgeDat() const
-
Get a edge rep.
- GraphEdgeIterC(const GraphEdgeC & AnEdge)
-
Create an iter from a GraphEdgeC.
- GraphEdgeIterC(GraphEdgeRepC & edge,IntrDListC<GraphEdgeRepC> & list)
-
Creates the iterator pointing to the edge which belongs to the 'list'.
- BooleanT operator==(const GraphEdgeC & Oth) const
-
True when both iterators are pointing at the same
edge.
- UIntT Hash(void) const
-
Returns a hash value for the current edge.
Access to the neighboring graph lists.
--------------------------------------
- GraphNodeC Source()
-
Returns the source node of this directed edge.
- GraphNodeC Target()
-
Returns the target node of this directed edge.
- GraphNodeC Node1()
-
Returns the first node of this undirected edge.
- GraphNodeC Node2()
-
Returns the second node of this undirected edge.
- GraphAdjC SourceAdj()
-
Returns the adjacency of the source node of this directed edge.
- GraphAdjC TargetAdj()
-
Returns the adjacency of the target node of this directed edge.
- GraphAdjC Node1Adj()
-
Returns the adjacency of the first node of this undirected edge.
- GraphAdjC Node2Adj()
-
Returns the adjacency of the second node of this undirected edge.
Direct access to the graph elements.
------------------------------------
- GraphNodeRepC & TargetRep()
-
Returns the target node of this directed edge.
- GraphNodeRepC & SourceRep()
-
Returns the source node of this directed edge.
- GraphNodeRepC & Node1Rep()
-
Returns the first node of this undirected edge.
- GraphNodeRepC & Node2Rep()
-
Returns the second node of this undirected edge.
Changing of the edge list.
--------------------------
- void Del()
-
Unlinks edge from the graph and deletes it. The iterator
will point to the previous edge in the graph edge list.
- void Redirect()
-
Changes the orientation of the edge. In other words it means
swapping of the meaning of Node1(), Source() with Node2(), Target().
If the graph is undirected the order of edges is held.
If the graph is directed the order of edges of both nodes
is changed.
Array item constructors.
------------------------
ATTENTION! The following member functions can be used only
for initialization of arrays. This constructor is provided because
of trouble with an array of objects. The present ANSI C++
does not enable to pass any constructor of array elements
different from a defaut constructor. The extension of GNU g++
compiler is not supported by other compiler. The constructor
should be used only for such purposes. If this limitation of C++
is removed, the constructor will be obsolete.
- void LateItemSet(BaseGraphC & graph)
-
Sets the unvalid graph edge iterator. The iterator will
point to the first edge in the edge list of the 'graph'.
- void LateItemSet(const GraphEdgeC & edge)
-
Sets the unvalid edge iterator to be the copy of the iterator 'edge'.
- BaseGraphC & Graph()
-
Returns the graph.
- IntrDLIterC<GraphEdgeRepC> Copy() const
-
Copy constructor.
- const IntrDLIterC<GraphEdgeRepC> & operator=(const IntrDLIterC<GraphEdgeRepC> & it)
-
Assingment. This iterator will point to the same list element as
the iterator 'it'.
Access to the object items.
---------------------------
- const IntrDLIterC<GraphEdgeRepC> & DLIter() const
-
Self-identification. The function returns this object.
Array item constructors.
------------------------
ATTENTION! The following member functions can be used only
for initialization of arrays. This constructor is provided because
of trouble with an array of objects. The present ANSI C++
does not enable to pass any constructor of array elements
different from a defaut constructor. The extension of GNU g++
compiler is not supported by other compiler. The constructor
should be used only for such purposes. If this limitation of C++
is removed, the constructor will be obsolete.
- void LateItemSet(IntrDListC<GraphEdgeRepC> & list)
-
Sets the unvalid list iterator. The iterator will
point to the first item of the 'list', if there is any, otherwise
to the head of the list.
- void LateItemSet(const IntrDLIterC<GraphEdgeRepC> & iter)
-
Sets the unvalid list iterator to be the copy of the iterator 'iter'.
- const GraphEdgeRepC & Data() const
-
Access to the constant object contained in the list element.
- GraphEdgeRepC & Data()
-
Access to the object contained in the list element.
BE CAREFUL. You must not change the links of created chains.
Positioning the iterator.
-------------------------
- BaseIntrDLIterC<GraphEdgeRepC> & First()
-
Sets the iterator to point to the first element of the list.
- BaseIntrDLIterC<GraphEdgeRepC> & Last()
-
Sets the iterator to point to the last element of the list.
- BaseIntrDLIterC<GraphEdgeRepC> & Next()
-
Moves the iterator to the successor of the element.
- BaseIntrDLIterC<GraphEdgeRepC> & Prev()
-
Moves the iterator to the predecessor of the element.
- BaseIntrDLIterC<GraphEdgeRepC> & NextCrc()
-
Moves the iterator to the successor of the element. If the result
element is not a proper element of the list the iterator is moved
to the first element.
- BaseIntrDLIterC<GraphEdgeRepC> & PrevCrc()
-
Moves the iterator to the predecessor of the element. If the result
element is not a proper element of the list the iterator is moved
to the last element.
- BaseIntrDLIterC<GraphEdgeRepC> & Nth(LongIntT n)
-
Sets to the n-th element of the list. The index 'n' can be
negative. The first element of the list has the index 0,
the last element has the index -1. It does not skip the head
of the list.
- BaseIntrDLIterC<GraphEdgeRepC> & RelNth(LongIntT n)
-
Moves to the n-th element from the current element.
The index 'n' can be positive, zero, or negative.
Particularly, the n = 0 means no move,
n = 1 means the move to the next element,
and n = -1 means the move to the previous element.
Link / Unlink / Delete.
-----------------------
- const BaseIntrDLIterC<GraphEdgeRepC> & LinkBef(GraphEdgeRepC * data)
-
Inserts the new element containing 'data' before the element
pointed to by this iterator. This iterator is returned.
- const BaseIntrDLIterC<GraphEdgeRepC> & LinkAft(GraphEdgeRepC * data)
-
Inserts the new element containing 'data' after the element
pointed to by this iterator. This iterator is returned.
- const BaseIntrDLIterC<GraphEdgeRepC> & MoveBef(BaseIntrDLIterC<GraphEdgeRepC> & iter)
-
The element pointed to by 'iter' is moved before the element
pointed to by this iterator. This iterator will point to the same
element as before. The iterator 'iter' will point
to the previous element in the original list.
- const BaseIntrDLIterC<GraphEdgeRepC> & MoveAft(BaseIntrDLIterC<GraphEdgeRepC> & iter)
-
The element pointed to by 'iter' is moved after the element
pointed to by this iterator. This iterator will point to the same
element as before. The iterator 'iter' will point
to the previous element in the original list.
- const BaseIntrDLIterC<GraphEdgeRepC> & MoveBef(IntrDListC<GraphEdgeRepC> & list)
-
All elements of the 'list' are moved before the element
pointed to by this iterator. The 'list' will be empty after
this operation.
- const BaseIntrDLIterC<GraphEdgeRepC> & MoveAft(IntrDListC<GraphEdgeRepC> & list)
-
All elements of the 'list' are moved before the element
pointed to by this iterator. The 'list' will be empty after
this operation.
- GraphEdgeRepC * UnlinkMoveNext()
-
Unlinks the element pointed to by this iterator and moves
iterator to the next element.
- GraphEdgeRepC * Unlink()
-
Unlinks the element pointed to by this iterator and moves
iterator to the previous element.
Array item constructors.
------------------------
ATTENTION! The following member functions can be used only
for initialization of arrays. This constructor is provided because
of trouble with an array of objects. The present ANSI C++
does not enable to pass any constructor of array elements
different from a defaut constructor. The extension of GNU g++
compiler is not supported by other compiler. The constructor
should be used only for such purposes. If this limitation of C++
is removed, the constructor will be obsolete.
- void LateItemSet(IntrDListC<GraphEdgeRepC> & list)
-
Sets the unvalid list iterator. The iterator will
point to the first item of the 'list', if there is any, otherwise
to the head of the list.
- void LateItemSet(const BaseIntrDLIterC<GraphEdgeRepC> & iter)
-
Sets the unvalid list iterator to be the copy of the iterator 'iter'.
- BaseIntrDLIterC<GraphEdgeRepC> Copy() const
-
Copy constructor.
- const BaseIntrDLIterC<GraphEdgeRepC> & operator=(const BaseIntrDLIterC<GraphEdgeRepC> & it)
-
Assingment. This iterator will point to the same list element as
the iterator 'it'.
- const BaseIntrDLIterC<GraphEdgeRepC> & DLIter() const
-
Self-identification. The function returns this object.
- const GraphEdgeRepC & Data() const
-
Access to the constant object contained in the list element.
- const IntrDListC<GraphEdgeRepC> & List() const
-
Returns the list whose element is pointed to by this iterator.
------------ Predicates -------------------------------------
- BooleanT operator==(const BaseIntrConstDLIterC<GraphEdgeRepC> & it) const
-
Returns TRUE if both iterators point to the same list element.
- BooleanT operator!=(const BaseIntrConstDLIterC<GraphEdgeRepC> & it) const
-
Returns TRUE if this iterators points to a different list element
than the iterator 'it'.
- BooleanT IsFirst() const
-
Returns TRUE if the pointed element is the first in a list.
- BooleanT IsLast() const
-
Returns TRUE if the pointed element is the last one in a list.
- BooleanT IsElm() const
-
Returns TRUE if the pointed an proper element (not a head) of a list.
----------- Positioning the iterator -----------------------------
- BaseIntrConstDLIterC<GraphEdgeRepC> & First()
-
Sets the iterator to point to the first element of the list.
- BaseIntrConstDLIterC<GraphEdgeRepC> & Last()
-
Sets the iterator to point to the last element of the list.
- BaseIntrConstDLIterC<GraphEdgeRepC> & Next()
-
Moves the iterator to the successor of the element.
- BaseIntrConstDLIterC<GraphEdgeRepC> & Prev()
-
Moves the iterator to the predecessor of the element.
- BaseIntrConstDLIterC<GraphEdgeRepC> & NextCrc()
-
Moves the iterator to the successor of the element. If the result
element is not a proper element of the list the iterator is moved
to the first element.
- BaseIntrConstDLIterC<GraphEdgeRepC> & PrevCrc()
-
Moves the iterator to the predecessor of the element. If the result
element is not a proper element of the list the iterator is moved
to the last element.
- BaseIntrConstDLIterC<GraphEdgeRepC> & Nth(LongIntT n)
-
Sets to the n-th element of the list. The index 'n' can be
negative. The first element of the list has the index 0,
the last element has the index -1. It does not skip the head
of the list.
- BaseIntrConstDLIterC<GraphEdgeRepC> & RelNth(LongIntT n)
-
Moves to the n-th element from the current element.
The index 'n' can be positive, zero, or negative.
Particularly, the n = 0 means no move,
n = 1 means the move to the next element,
and n = -1 means the move to the previous element.
- LongIntT Index() const
-
Returns the offset of an element from the first element.
Particularly, it returns 0 if the iterator points to the first
element, it returns -1 if element is the head of the list,
and it returns -2 if the element is not contained in the list.
The function does not check counter overflow.
Array item constructors.
------------------------
ATTENTION! The following member functions can be used only
for initialization of arrays. This constructor is provided because
of trouble with an array of objects. The present ANSI C++
does not enable to pass any constructor of array elements
different from a defaut constructor. The extension of GNU g++
compiler is not supported by other compiler. The constructor
should be used only for such purposes. If this limitation of C++
is removed, the constructor will be obsolete.
- void LateItemSet(IntrDListC<GraphEdgeRepC> & list)
-
Sets the unvalid list iterator. The iterator will
point to the first item of the 'list', if there is any, otherwise
to the head of the list.
- void LateItemSet(const BaseIntrConstDLIterC<GraphEdgeRepC> & iter)
-
Sets the unvalid list iterator to be the copy of the iterator 'iter'.
- BooleanT IsValid() const
-
Returns TRUE if the iterator was not constructed by the default
constructor.
- void Set(IntrDListC<GraphEdgeRepC> & list,GraphEdgeRepC * data)
-
Sets the iterator to point to the element 'data' that
belongs to the 'list'.
- const BaseIntrConstDLIterC<GraphEdgeRepC> & operator=(const BaseIntrConstDLIterC<GraphEdgeRepC> & it)
-
Assingment. This iterator will point to the same list element as
the iterator 'it'.
- const BaseIntrConstDLIterC<GraphEdgeRepC> & DLIter() const
-
Self-identification. The function returns this object.
- const BaseIntrConstDLIterC<GraphEdgeRepC> & LinkBef(GraphEdgeRepC * data)
-
Inserts the new element containing 'data' before the element
pointed to by this iterator. This iterator is returned.
- const BaseIntrConstDLIterC<GraphEdgeRepC> & LinkAft(GraphEdgeRepC * data)
-
Inserts the new element containing 'data' after the element
pointed to by this iterator. This iterator is returned.
- const BaseIntrConstDLIterC<GraphEdgeRepC> & MoveBef(BaseIntrConstDLIterC<GraphEdgeRepC> & iter)
-
The element pointed to by 'iter' is moved before the element
pointed to by this iterator. This iterator will point to the same
element as before, the iterator 'iter' will point to the previous
element in the original list.
- const BaseIntrConstDLIterC<GraphEdgeRepC> & MoveAft(BaseIntrConstDLIterC<GraphEdgeRepC> & iter)
-
The element pointed to by 'iter' is moved after the element
pointed to by this iterator. This iterator will point to the same
element as before, the iterator 'iter' will point to the previous
element in the original list.
- const BaseIntrConstDLIterC<GraphEdgeRepC> & MoveBef(IntrDListC<GraphEdgeRepC> & list)
-
All elements of the 'list' are moved before the element
pointed to by this iterator. The 'list' will be empty after
this operation.
- const BaseIntrConstDLIterC<GraphEdgeRepC> & MoveAft(IntrDListC<GraphEdgeRepC> & list)
-
All elements of the 'list' are moved before the element
pointed to by this iterator. The 'list' will be empty after
this operation.
- GraphEdgeRepC * UnlinkMoveNext()
-
Unlink the element pointed to by this iterator and moves
iterator to the next element.
- GraphEdgeRepC * Unlink()
-
Unlink the element pointed to by this iterator and moves
iterator to the previous element.
- ostream & operator<<(ostream & s,const BaseIntrConstDLIterC<GraphEdgeRepC> & elm)
-
|
Programmer:Charles Galambos, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001
|