bioprocessing  5.1.2
bio::SetEdge< V > Class Template Reference

Edges: set implementation of non-oriented edges. More...

#include <bioprocessing/graph/setedge.h>

Inheritance diagram for bio::SetEdge< V >:
Collaboration diagram for bio::SetEdge< V >:

Public Types

typedef V Vertex
 Usable vertex type. More...
 
typedef SetEdgeRef< V > Edge
 Usable edge type. More...
 
typedef SetEdgeRef< V > Ref
 Reference type. More...
 
typedef VertexSet::const_iterator const_iterator
 
typedef VertexSet::iterator iterator
 
- Public Types inherited from bio::BaseEdge< V >
typedef V Vertex
 Vertex type. More...
 
typedef BaseEdgeRef< V > Edge
 Usable Edge type (RC) More...
 
typedef BaseEdgeRef< V > Ref
 Reference type. More...
 

Public Member Functions

 SetEdge (const Vertex &x, const Vertex &y)
 Constructor from a pair of vertices. More...
 
 SetEdge (const This &other)
 Copy constructor. More...
 
 SetEdge (const Base &other)
 Copy constructor from base class. More...
 
virtual ~SetEdge ()
 
const_iterator begin () const
 
const_iterator end () const
 
iterator begin ()
 
iterator end ()
 
Vertex x ()
 access the first vertex (x is the smaller vertex) More...
 
const Vertex x () const
 access the first vertex (x is the smaller vertex) More...
 
Vertex y ()
 access the second vertex (y is the bigger vertex) More...
 
const Vertex y () const
 access the second vertex (y is the bigger vertex) More...
 
Vertex other (const Vertex &v)
 access the vertex that is not v More...
 
const Vertex other (const Vertex &v) const
 access the vertex that is not v More...
 
virtual bool operator== (const This &other) const
 there is equality if both vertices are equal More...
 
virtual bool operator!= (const This &other) const
 there is equality if both vertices are equal More...
 
virtual bool operator> (const This &other) const
 For inequality we first look at x, and if they are equal, we look at y. More...
 
virtual bool operator< (const This &other) const
 For inequality we first look at x, and if they are equal, we look at y. More...
 
virtual bool operator>= (const This &other) const
 For inequality we first look at x, and if they are equal, we look at y. More...
 
virtual bool operator<= (const This &other) const
 For inequality we first look at x, and if they are equal, we look at y. More...
 
- Public Member Functions inherited from bio::BaseEdge< V >
virtual ~BaseEdge ()
 

Public Attributes

VertexSet _set
 

Protected Types

typedef SetEdge< V > This
 Type of *this. More...
 
typedef BaseEdge< V > Base
 Base class type. More...
 
typedef std::set< V > VertexSet
 Vertex set type. More...
 
- Protected Types inherited from bio::BaseEdge< V >
typedef BaseEdge< V > This
 Type of *this. More...
 

Friends

class SetEdgeRef< V >
 

Detailed Description

template<typename V>
class bio::SetEdge< V >

Edges: set implementation of non-oriented edges.

This class implements an edge with a set of Vertex. By construction, this et is always of size 2.

It is templated on a vertex type (prefer a VertexRef type)

Definition at line 37 of file setedge.h.

Member Typedef Documentation

◆ Base

template<typename V >
typedef BaseEdge<V> bio::SetEdge< V >::Base
protected

Base class type.

Definition at line 42 of file setedge.h.

◆ const_iterator

template<typename V >
typedef VertexSet::const_iterator bio::SetEdge< V >::const_iterator

Definition at line 69 of file setedge.h.

◆ Edge

template<typename V >
typedef SetEdgeRef<V> bio::SetEdge< V >::Edge

Usable edge type.

Definition at line 46 of file setedge.h.

◆ iterator

template<typename V >
typedef VertexSet::iterator bio::SetEdge< V >::iterator

Definition at line 70 of file setedge.h.

◆ Ref

template<typename V >
typedef SetEdgeRef<V> bio::SetEdge< V >::Ref

Reference type.

Definition at line 47 of file setedge.h.

◆ This

template<typename V >
typedef SetEdge<V> bio::SetEdge< V >::This
protected

Type of *this.

Definition at line 41 of file setedge.h.

◆ Vertex

template<typename V >
typedef V bio::SetEdge< V >::Vertex

Usable vertex type.

Definition at line 45 of file setedge.h.

◆ VertexSet

template<typename V >
typedef std::set<V> bio::SetEdge< V >::VertexSet
protected

Vertex set type.

Definition at line 43 of file setedge.h.

Constructor & Destructor Documentation

◆ SetEdge() [1/3]

template<typename V >
bio::SetEdge< V >::SetEdge ( const Vertex x,
const Vertex y 
)
inline

Constructor from a pair of vertices.

Definition at line 52 of file setedge.h.

References bio::SetEdge< V >::_set, bio::SetEdge< V >::x(), and bio::SetEdge< V >::y().

◆ SetEdge() [2/3]

template<typename V >
bio::SetEdge< V >::SetEdge ( const This other)
inline

Copy constructor.

Definition at line 58 of file setedge.h.

◆ SetEdge() [3/3]

template<typename V >
bio::SetEdge< V >::SetEdge ( const Base other)
inline

Copy constructor from base class.

Definition at line 60 of file setedge.h.

References bio::SetEdge< V >::_set, and bio::SetEdge< V >::other().

◆ ~SetEdge()

template<typename V >
virtual bio::SetEdge< V >::~SetEdge ( )
inlinevirtual

Definition at line 65 of file setedge.h.

Member Function Documentation

◆ begin() [1/2]

template<typename V >
iterator bio::SetEdge< V >::begin ( )
inline

Definition at line 73 of file setedge.h.

References bio::SetEdge< V >::_set.

◆ begin() [2/2]

◆ end() [1/2]

template<typename V >
iterator bio::SetEdge< V >::end ( )
inline

Definition at line 74 of file setedge.h.

References bio::SetEdge< V >::_set.

◆ end() [2/2]

template<typename V >
const_iterator bio::SetEdge< V >::end ( ) const
inline

Definition at line 72 of file setedge.h.

References bio::SetEdge< V >::_set.

Referenced by bio::SetEdge< V >::operator<(), and bio::SetEdge< V >::operator>().

◆ operator!=()

template<typename V >
virtual bool bio::SetEdge< V >::operator!= ( const This other) const
inlinevirtual

there is equality if both vertices are equal

Reimplemented from bio::BaseEdge< V >.

Definition at line 107 of file setedge.h.

References bio::SetEdge< V >::other(), bio::SetEdge< V >::x(), and bio::SetEdge< V >::y().

◆ operator<()

template<typename V >
virtual bool bio::SetEdge< V >::operator< ( const This other) const
inlinevirtual

For inequality we first look at x, and if they are equal, we look at y.

(alphabetical ordering)

Reimplemented from bio::BaseEdge< V >.

Definition at line 127 of file setedge.h.

References bio::SetEdge< V >::begin(), bio::SetEdge< V >::end(), and bio::SetEdge< V >::other().

◆ operator<=()

template<typename V >
virtual bool bio::SetEdge< V >::operator<= ( const This other) const
inlinevirtual

For inequality we first look at x, and if they are equal, we look at y.

(alphabetical ordering)

Reimplemented from bio::BaseEdge< V >.

Definition at line 147 of file setedge.h.

References bio::SetEdge< V >::other().

◆ operator==()

template<typename V >
virtual bool bio::SetEdge< V >::operator== ( const This other) const
inlinevirtual

there is equality if both vertices are equal

Reimplemented from bio::BaseEdge< V >.

Definition at line 102 of file setedge.h.

References bio::SetEdge< V >::other(), bio::SetEdge< V >::x(), and bio::SetEdge< V >::y().

◆ operator>()

template<typename V >
virtual bool bio::SetEdge< V >::operator> ( const This other) const
inlinevirtual

For inequality we first look at x, and if they are equal, we look at y.

(alphabetical ordering)

Reimplemented from bio::BaseEdge< V >.

Definition at line 113 of file setedge.h.

References bio::SetEdge< V >::begin(), bio::SetEdge< V >::end(), and bio::SetEdge< V >::other().

◆ operator>=()

template<typename V >
virtual bool bio::SetEdge< V >::operator>= ( const This other) const
inlinevirtual

For inequality we first look at x, and if they are equal, we look at y.

(alphabetical ordering)

Reimplemented from bio::BaseEdge< V >.

Definition at line 141 of file setedge.h.

References bio::SetEdge< V >::other().

◆ other() [1/2]

template<typename V >
Vertex bio::SetEdge< V >::other ( const Vertex v)
inlinevirtual

◆ other() [2/2]

template<typename V >
const Vertex bio::SetEdge< V >::other ( const Vertex v) const
inlinevirtual

access the vertex that is not v

Reimplemented from bio::BaseEdge< V >.

Definition at line 93 of file setedge.h.

References bio::SetEdge< V >::begin().

◆ x() [1/2]

template<typename V >
Vertex bio::SetEdge< V >::x ( )
inlinevirtual

access the first vertex (x is the smaller vertex)

Reimplemented from bio::BaseEdge< V >.

Definition at line 79 of file setedge.h.

References bio::SetEdge< V >::begin().

Referenced by bio::SetEdge< V >::operator!=(), bio::SetEdge< V >::operator==(), and bio::SetEdge< V >::SetEdge().

◆ x() [2/2]

template<typename V >
const Vertex bio::SetEdge< V >::x ( ) const
inlinevirtual

access the first vertex (x is the smaller vertex)

Reimplemented from bio::BaseEdge< V >.

Definition at line 81 of file setedge.h.

References bio::SetEdge< V >::begin().

◆ y() [1/2]

template<typename V >
Vertex bio::SetEdge< V >::y ( )
inlinevirtual

access the second vertex (y is the bigger vertex)

Reimplemented from bio::BaseEdge< V >.

Definition at line 83 of file setedge.h.

References bio::SetEdge< V >::begin().

Referenced by bio::SetEdge< V >::operator!=(), bio::SetEdge< V >::operator==(), and bio::SetEdge< V >::SetEdge().

◆ y() [2/2]

template<typename V >
const Vertex bio::SetEdge< V >::y ( ) const
inlinevirtual

access the second vertex (y is the bigger vertex)

Reimplemented from bio::BaseEdge< V >.

Definition at line 85 of file setedge.h.

References bio::SetEdge< V >::begin().

Friends And Related Function Documentation

◆ SetEdgeRef< V >

template<typename V >
friend class SetEdgeRef< V >
friend

Definition at line 153 of file setedge.h.

Member Data Documentation

◆ _set

template<typename V >
VertexSet bio::SetEdge< V >::_set

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