11 #ifndef BIOPROCESSING_GRAPH_SETEDGE
12 #define BIOPROCESSING_GRAPH_SETEDGE
17 #include <cartobase/smart/rcptr.h>
24 template <
typename V>
class SetEdge;
25 template <
typename V>
class SetEdgeRef;
90 return( v == *i ? *(++i) : *i );
96 return( v == *i ? *(++i) : *i );
143 return ( *
this ==
other ) || ( *
this >
other );
149 return ( *
this ==
other ) || ( *
this <
other );
166 template <
typename V>
215 if( !(*
this) && !
other )
217 else if( !(*
this) || !
other )
224 return !( *
this ==
other );
230 else if( !(*
this) || !
other )
239 else if( !(*
this) || !
other )
246 return ( *
this ==
other ) || ( *
this >
other );
250 return ( *
this ==
other ) || ( *
this <
other );
Reference counting pointer to a BaseEdge.
carto::rc_ptr< BaseEdge< V > > Base
Base class.
Pointed::Vertex Vertex
Usable vertex type.
virtual Vertex other(const Vertex &v)
access the vertex that is not v
virtual Vertex x()
access the first vertex (arbitrary choice for non oriented edges)
virtual Vertex y()
access the second vertex (arbitrary choice for non oriented edges)
Reference counting pointer to a SetEdge.
Pointed::iterator iterator
static Edge none()
Empty pointer factory.
virtual const_iterator end() const
Pointed::Edge Edge
USable Edge type.
SetEdge< V > Pointed
Pointed object type.
Pointed::Vertex Vertex
Usable Vertex type.
virtual const_iterator begin() const
virtual bool operator>(const This &other) const
SetEdgeRef(const Vertex &x, const Vertex &y)
Constructor from a pair of vertices.
virtual bool operator!=(const This &other) const
virtual bool operator>=(const This &other) const
Pointed::const_iterator const_iterator
SetEdgeRef< V > This
Type of *this.
virtual bool operator<=(const This &other) const
SetEdgeRef()
Default constructor (builds a none pointer)
SetEdgeRef(const Base &other)
Copy constructor (it copies the reference, it does not duplicate the pointed object)
SetEdgeRef(Pointed *e)
Constructor from a pointer (the pointer should either be created by new, or be already referenced by ...
BaseEdgeRef< V > Base
Base class type.
virtual bool operator<(const This &other) const
virtual bool operator==(const This &other) const
There is equality if both pointers are none, or if both pointed objects are equal.
Edges: set implementation of non-oriented edges.
const_iterator end() const
std::set< V > VertexSet
Vertex set type.
virtual bool operator!=(const This &other) const
there is equality if both vertices are equal
virtual bool operator>(const This &other) const
For inequality we first look at x, and if they are equal, we look at y.
Vertex y()
access the second vertex (y is the bigger vertex)
SetEdgeRef< V > Ref
Reference type.
SetEdge< V > This
Type of *this.
SetEdge(const Vertex &x, const Vertex &y)
Constructor from a pair of vertices.
const Vertex other(const Vertex &v) const
access the vertex that is not v
Vertex other(const Vertex &v)
access the vertex that is not v
virtual bool operator<=(const This &other) const
For inequality we first look at x, and if they are equal, we look at y.
SetEdgeRef< V > Edge
Usable edge type.
virtual bool operator==(const This &other) const
there is equality if both vertices are equal
BaseEdge< V > Base
Base class type.
SetEdge(const Base &other)
Copy constructor from base class.
Vertex x()
access the first vertex (x is the smaller vertex)
virtual bool operator>=(const This &other) const
For inequality we first look at x, and if they are equal, we look at y.
const Vertex x() const
access the first vertex (x is the smaller vertex)
VertexSet::const_iterator const_iterator
virtual bool operator<(const This &other) const
For inequality we first look at x, and if they are equal, we look at y.
V Vertex
Usable vertex type.
SetEdge(const This &other)
Copy constructor.
VertexSet::iterator iterator
const_iterator begin() const
const Vertex y() const
access the second vertex (y is the bigger vertex)