11 #ifndef BIOPROCESSING_GRAPH_EWGRAPH 12 #define BIOPROCESSING_GRAPH_EWGRAPH 17 #include <cartobase/smart/rcptr.h> 38 template <
typename E,
typename W>
58 virtual void insert( Edge e, Weight w = (Weight)0 ) {
throw; }
59 virtual Weight
weight(
const Edge & e ) {
throw; }
60 virtual Weight
weight(
const Edge & e )
const {
throw; }
67 virtual bool isMinimum(
const Graph & g )
const {
throw; }
70 template <
typename Path>
72 template <
typename Path>
74 template <
typename EdgeSet>
76 template <
typename EdgeSet>
85 virtual Weight
weight(
const Graph & g )
const {
throw; }
86 virtual Weight
Fm(
const Vertex & v )
const {
throw; }
91 static Weight
Fm(
const G & thisg,
const Vertex & v );
97 template <
typename E,
typename W>
101 typename G::edge_const_iterator e;
102 W min = std::numeric_limits<W>::max();
104 for( e = thisg.beginEdge(v); e != thisg.endEdge(v); ++e )
121 template <
typename E,
typename W>
144 static Graph
none() {
return This( (Pointed*)0 ); }
148 virtual void insert( Edge e, Weight w = (Weight)0 ) {
return ((Pointed*)(this->
get()))->insert(e,w); }
149 virtual Weight
weight(
const Edge & e ) {
return ((Pointed*)(this->
get()))->weight(e); }
150 virtual Weight
weight(
const Edge & e )
const {
return ((Pointed*)(this->
get()))->weight(e); }
170 virtual Weight
Fm(
const Vertex & v )
const {
return ((Pointed*)(this->
get()))->Fm(v); }
178 #endif // BIOPROCESSING_GRAPH_EWGRAPH virtual Weight weight(const Edge &e)
EWBaseGraphRef< E, W > Graph
Usable graph type.
BaseGraph< E > Base
Base class.
bool isDescending(const Path &p) const
EWBaseGraphRef< E, W > This
virtual ~EWBaseGraphRef()
virtual Weight weight(const Edge &e)
EWBaseGraphRef(Pointed *g)
virtual Weight Fm(const Vertex &v) const
EWBaseGraph< E, W > This
Type of *this.
EWBaseGraph< E, W > Pointed
virtual Graph getMinOfF() const
bool isBasinCut(const EdgeSet &es) const
Base::Vertex Vertex
Usable vertex type.
virtual Weight weight(const Edge &e) const
Base::Edge Edge
Usable edge type.
virtual void insert(Edge e, Weight w=(Weight) 0)
virtual Weight Fm(const Vertex &v) const
Reference counting pointer to a SetEdge.
bool isWatershedCut(const EdgeSet &s) const
Edge::Vertex Vertex
Usable vertex type.
virtual Weight weight(const Graph &g) const
virtual void insert(Edge e, Weight w=(Weight) 0)
Base class for edge weighted graphs.
virtual bool isMinimum(const Graph &g) const
EWBaseGraphRef(const Base &other)
Reference to a EWBaseGraph.
virtual Weight weight(const Edge &e) const
virtual bool isMinimumSpanningForestRelativeTo(const Graph &h, const Graph &g) const
EWBaseGraphRef< E, W > Ref
Reference type.
bool isPathofSteepestdescent(const Path &p) const
virtual bool isMinimumSpanningTree(const Graph &g) const
Reference to a BaseGraph.