bioprocessing  5.1.2
bio::BaseGraph< E > Class Template Reference

Base class for graphs. More...

#include <bioprocessing/graph/basegraph.h>

Inheritance diagram for bio::BaseGraph< E >:
Collaboration diagram for bio::BaseGraph< E >:

Public Types

typedef E Edge
 Usable edge type. More...
 
typedef Edge::Vertex Vertex
 Usable vertex type. More...
 
typedef BaseGraphRef< E > Graph
 Usable graph type. More...
 
typedef BaseGraphRef< E > Ref
 Reference type. More...
 

Public Member Functions

virtual ~BaseGraph ()
 
virtual void insert (Vertex v)
 
virtual void insert (Edge e)
 
virtual bool contains (const Vertex &v) const
 
virtual bool contains (const Edge &e) const
 
virtual bool empty () const
 
virtual void clear ()
 
virtual bool operator== (const This &other) const
 
virtual bool operator!= (const This &other) const
 
virtual bool operator> (const This &other) const
 
virtual bool operator< (const This &other) const
 
virtual bool operator>= (const This &other) const
 
virtual bool operator<= (const This &other) const
 
virtual bool operator= (const This &other)
 
virtual bool isAdjacent (const Vertex &x, const Vertex &y) const
 
virtual bool isLinked (const Vertex &x, const Vertex &y) const
 
virtual bool isSubGraph (const Graph &g) const
 
virtual bool isConnectedComponent (const Graph &g) const
 
virtual bool isAdjacentTo (const Vertex &v, const Graph &g) const
 
virtual bool isAdjacentFrom (const Vertex &v, const Graph &g) const
 
virtual bool isAdjacent (const Edge &e) const
 
virtual bool isLinked (const Vertex &v) const
 
virtual bool isExtension (const Graph &h, const Graph &g) const
 
virtual bool isForestRelativeTo (const Graph &h, const Graph &g) const
 
virtual bool isSpanningForestRelativeTo (const Graph &h, const Graph &g) const
 
virtual bool isTree (const Graph &g) const
 
virtual bool isSpanningTree (const Graph &g) const
 
virtual bool isForest (const Graph &g) const
 
virtual bool isSpanningForest (const Graph &g) const
 
template<typename EdgeIterator >
bool isGraphCut (EdgeIterator begin, EdgeIterator end, const Graph &g) const
 
template<typename EdgeSet >
bool isGraphCut (const EdgeSet &es, const Graph &g) const
 

Static Public Member Functions

template<typename Set >
static Set getComplement (const Set &s, const Set &e)
 

Protected Types

typedef BaseGraph< E > This
 Type of *this. More...
 

Static Protected Member Functions

template<typename G >
static bool isAdjacent (const G &thisg, const Vertex &x, const Vertex &y)
 These methods are templated on the iterator type (which is implementation dependant and thus not known in BaseGraph). More...
 
template<typename G >
static bool isLinked (const G &thisg, const Vertex &x, const Vertex &y)
 
template<typename VertexSet , typename G >
static bool isLinked (const G &thisg, const Vertex &x, const Vertex &y, VertexSet &s)
 
template<typename G >
static bool isSubGraph (const G &thisg, const typename G::Ref &g)
 
template<typename G >
static bool isConnectedComponent (const G &thisg, const typename G::Ref &g)
 
template<typename G >
static bool isAdjacent (const G &thisg, const Edge &e)
 
template<typename G >
static bool isAdjacentTo (const G &thisg, const Vertex &v, const typename G::Ref &g)
 
template<typename G >
static bool isAdjacentFrom (const G &thisg, const Vertex &v, const typename G::Ref &g)
 
template<typename G >
static G::Ref getConnectedComponent (G &thisg, Vertex &v)
 
template<typename G >
static void getConnectedComponent (G &thisg, Vertex &v, typename G::Ref &g)
 

Friends

class BaseGraphRef< E >
 

Detailed Description

template<typename E>
class bio::BaseGraph< E >

Base class for graphs.

This class does not depends on members implementation. It defines abstract methods that need to be implemented (mainly: iterators, insert, contains) and defines a number of generic graph methods that can be inherited.
It is only templated on the Edge type (with the assumption that those edges define a Vertex type) and is thus highly generic.

Template Parameters
EEdge type (prefer RC types)

Definition at line 39 of file basegraph.h.

Member Typedef Documentation

◆ Edge

template<typename E >
typedef E bio::BaseGraph< E >::Edge

Usable edge type.

Definition at line 45 of file basegraph.h.

◆ Graph

template<typename E >
typedef BaseGraphRef<E> bio::BaseGraph< E >::Graph

Usable graph type.

Definition at line 47 of file basegraph.h.

◆ Ref

template<typename E >
typedef BaseGraphRef<E> bio::BaseGraph< E >::Ref

Reference type.

Definition at line 48 of file basegraph.h.

◆ This

template<typename E >
typedef BaseGraph<E> bio::BaseGraph< E >::This
protected

Type of *this.

Definition at line 43 of file basegraph.h.

◆ Vertex

template<typename E >
typedef Edge::Vertex bio::BaseGraph< E >::Vertex

Usable vertex type.

Definition at line 46 of file basegraph.h.

Constructor & Destructor Documentation

◆ ~BaseGraph()

template<typename E >
virtual bio::BaseGraph< E >::~BaseGraph ( )
inlinevirtual

Definition at line 52 of file basegraph.h.

Member Function Documentation

◆ clear()

template<typename E >
virtual void bio::BaseGraph< E >::clear ( )
inlinevirtual

Reimplemented in bio::VolumeGraph< T, P >.

Definition at line 63 of file basegraph.h.

◆ contains() [1/2]

template<typename E >
virtual bool bio::BaseGraph< E >::contains ( const Edge e) const
inlinevirtual

Reimplemented in bio::VolumeGraph< T, P >.

Definition at line 61 of file basegraph.h.

◆ contains() [2/2]

template<typename E >
virtual bool bio::BaseGraph< E >::contains ( const Vertex v) const
inlinevirtual

Reimplemented in bio::VolumeGraph< T, P >.

Definition at line 60 of file basegraph.h.

◆ empty()

template<typename E >
virtual bool bio::BaseGraph< E >::empty ( ) const
inlinevirtual

Reimplemented in bio::VolumeGraph< T, P >.

Definition at line 62 of file basegraph.h.

◆ getComplement()

template<typename E >
template<typename Set >
Set bio::BaseGraph< E >::getComplement ( const Set &  s,
const Set &  e 
)
static

Definition at line 291 of file basegraph.h.

Referenced by bio::VolumeGraph< T, P >::getComplement().

◆ getConnectedComponent() [1/2]

template<typename E >
template<typename G >
G::Ref bio::BaseGraph< E >::getConnectedComponent ( G &  thisg,
Vertex v 
)
staticprotected

Definition at line 264 of file basegraph.h.

Referenced by bio::VolumeGraph< T, P >::getConnectedComponent().

◆ getConnectedComponent() [2/2]

template<typename E >
template<typename G >
void bio::BaseGraph< E >::getConnectedComponent ( G &  thisg,
Vertex v,
typename G::Ref &  g 
)
staticprotected

Definition at line 274 of file basegraph.h.

◆ insert() [1/2]

template<typename E >
virtual void bio::BaseGraph< E >::insert ( Edge  e)
inlinevirtual

Reimplemented in bio::VolumeGraph< T, P >.

Definition at line 59 of file basegraph.h.

◆ insert() [2/2]

template<typename E >
virtual void bio::BaseGraph< E >::insert ( Vertex  v)
inlinevirtual

Reimplemented in bio::VolumeGraph< T, P >.

Definition at line 58 of file basegraph.h.

◆ isAdjacent() [1/4]

template<typename E >
virtual bool bio::BaseGraph< E >::isAdjacent ( const Edge e) const
inlinevirtual

Definition at line 88 of file basegraph.h.

◆ isAdjacent() [2/4]

template<typename E >
template<typename G >
bool bio::BaseGraph< E >::isAdjacent ( const G &  thisg,
const Edge e 
)
staticprotected

Definition at line 230 of file basegraph.h.

◆ isAdjacent() [3/4]

template<typename E >
template<typename G >
bool bio::BaseGraph< E >::isAdjacent ( const G &  thisg,
const Vertex x,
const Vertex y 
)
staticprotected

These methods are templated on the iterator type (which is implementation dependant and thus not known in BaseGraph).

They can be used to rapidely write classical graph methods as those presented in the virtual properties/methods categories

Definition at line 148 of file basegraph.h.

◆ isAdjacent() [4/4]

template<typename E >
virtual bool bio::BaseGraph< E >::isAdjacent ( const Vertex x,
const Vertex y 
) const
inlinevirtual

Reimplemented in bio::VolumeGraph< T, P >.

Definition at line 82 of file basegraph.h.

Referenced by bio::VolumeGraph< T, P >::isAdjacent().

◆ isAdjacentFrom() [1/2]

template<typename E >
template<typename G >
bool bio::BaseGraph< E >::isAdjacentFrom ( const G &  thisg,
const Vertex v,
const typename G::Ref &  g 
)
staticprotected

Definition at line 251 of file basegraph.h.

◆ isAdjacentFrom() [2/2]

template<typename E >
virtual bool bio::BaseGraph< E >::isAdjacentFrom ( const Vertex v,
const Graph g 
) const
inlinevirtual

Reimplemented in bio::VolumeGraph< T, P >.

Definition at line 87 of file basegraph.h.

Referenced by bio::VolumeGraph< T, P >::isAdjacentFrom().

◆ isAdjacentTo() [1/2]

template<typename E >
template<typename G >
bool bio::BaseGraph< E >::isAdjacentTo ( const G &  thisg,
const Vertex v,
const typename G::Ref &  g 
)
staticprotected

Definition at line 238 of file basegraph.h.

◆ isAdjacentTo() [2/2]

template<typename E >
virtual bool bio::BaseGraph< E >::isAdjacentTo ( const Vertex v,
const Graph g 
) const
inlinevirtual

Reimplemented in bio::VolumeGraph< T, P >.

Definition at line 86 of file basegraph.h.

Referenced by bio::VolumeGraph< T, P >::isAdjacentTo().

◆ isConnectedComponent() [1/2]

template<typename E >
template<typename G >
bool bio::BaseGraph< E >::isConnectedComponent ( const G &  thisg,
const typename G::Ref &  g 
)
staticprotected

Definition at line 218 of file basegraph.h.

◆ isConnectedComponent() [2/2]

template<typename E >
virtual bool bio::BaseGraph< E >::isConnectedComponent ( const Graph g) const
inlinevirtual

Reimplemented in bio::VolumeGraph< T, P >.

Definition at line 85 of file basegraph.h.

Referenced by bio::VolumeGraph< T, P >::isConnectedComponent().

◆ isExtension()

template<typename E >
virtual bool bio::BaseGraph< E >::isExtension ( const Graph h,
const Graph g 
) const
inlinevirtual

Definition at line 90 of file basegraph.h.

◆ isForest()

template<typename E >
virtual bool bio::BaseGraph< E >::isForest ( const Graph g) const
inlinevirtual

Definition at line 95 of file basegraph.h.

◆ isForestRelativeTo()

template<typename E >
virtual bool bio::BaseGraph< E >::isForestRelativeTo ( const Graph h,
const Graph g 
) const
inlinevirtual

Definition at line 91 of file basegraph.h.

◆ isGraphCut() [1/2]

template<typename E >
template<typename EdgeSet >
bool bio::BaseGraph< E >::isGraphCut ( const EdgeSet &  es,
const Graph g 
) const
inline

Definition at line 100 of file basegraph.h.

◆ isGraphCut() [2/2]

template<typename E >
template<typename EdgeIterator >
bool bio::BaseGraph< E >::isGraphCut ( EdgeIterator  begin,
EdgeIterator  end,
const Graph g 
) const
inline

Definition at line 98 of file basegraph.h.

◆ isLinked() [1/4]

template<typename E >
template<typename G >
bool bio::BaseGraph< E >::isLinked ( const G &  thisg,
const Vertex x,
const Vertex y 
)
staticprotected

Definition at line 161 of file basegraph.h.

◆ isLinked() [2/4]

template<typename E >
template<typename VertexSet , typename G >
bool bio::BaseGraph< E >::isLinked ( const G &  thisg,
const Vertex x,
const Vertex y,
VertexSet &  s 
)
staticprotected

Definition at line 178 of file basegraph.h.

◆ isLinked() [3/4]

template<typename E >
virtual bool bio::BaseGraph< E >::isLinked ( const Vertex v) const
inlinevirtual

Definition at line 89 of file basegraph.h.

◆ isLinked() [4/4]

template<typename E >
virtual bool bio::BaseGraph< E >::isLinked ( const Vertex x,
const Vertex y 
) const
inlinevirtual

Reimplemented in bio::VolumeGraph< T, P >.

Definition at line 83 of file basegraph.h.

Referenced by bio::VolumeGraph< T, P >::isLinked().

◆ isSpanningForest()

template<typename E >
virtual bool bio::BaseGraph< E >::isSpanningForest ( const Graph g) const
inlinevirtual

Definition at line 96 of file basegraph.h.

◆ isSpanningForestRelativeTo()

template<typename E >
virtual bool bio::BaseGraph< E >::isSpanningForestRelativeTo ( const Graph h,
const Graph g 
) const
inlinevirtual

Definition at line 92 of file basegraph.h.

◆ isSpanningTree()

template<typename E >
virtual bool bio::BaseGraph< E >::isSpanningTree ( const Graph g) const
inlinevirtual

Definition at line 94 of file basegraph.h.

◆ isSubGraph() [1/2]

template<typename E >
template<typename G >
bool bio::BaseGraph< E >::isSubGraph ( const G &  thisg,
const typename G::Ref &  g 
)
staticprotected

Definition at line 197 of file basegraph.h.

◆ isSubGraph() [2/2]

template<typename E >
virtual bool bio::BaseGraph< E >::isSubGraph ( const Graph g) const
inlinevirtual

Reimplemented in bio::VolumeGraph< T, P >.

Definition at line 84 of file basegraph.h.

Referenced by bio::VolumeGraph< T, P >::isSubGraph().

◆ isTree()

template<typename E >
virtual bool bio::BaseGraph< E >::isTree ( const Graph g) const
inlinevirtual

Definition at line 93 of file basegraph.h.

◆ operator!=()

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

Definition at line 69 of file basegraph.h.

◆ operator<()

template<typename E >
virtual bool bio::BaseGraph< E >::operator< ( const This other) const
inlinevirtual

Definition at line 71 of file basegraph.h.

◆ operator<=()

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

Definition at line 73 of file basegraph.h.

◆ operator=()

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

◆ operator==()

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

Definition at line 68 of file basegraph.h.

◆ operator>()

template<typename E >
virtual bool bio::BaseGraph< E >::operator> ( const This other) const
inlinevirtual

Definition at line 70 of file basegraph.h.

◆ operator>=()

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

Definition at line 72 of file basegraph.h.

Friends And Related Function Documentation

◆ BaseGraphRef< E >

template<typename E >
friend class BaseGraphRef< E >
friend

Definition at line 132 of file basegraph.h.


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