aGrUM 3.1.1
a C++ library for (probabilistic) graphical models
gum::SpanningForest Class Referenceabstract

Base class for computing min cost spanning trees or forests. More...

#include <spanningForest.h>

Inheritance diagram for gum::SpanningForest:

Public Member Functions

Accessors / Modifiers
virtual const EdgeSetedgesInSpanningForest ()=0
 Returns the edges in a min cost spanning forest.
virtual const UndiGraphspanningForest ()=0
 Construct the spanning forest.
virtual float costOfSpanningForest ()=0
 Returns the cost of the spanning forest.

Constructors / Destructors

virtual ~SpanningForest ()
 Destructor.
 SpanningForest ()
 default constructor
 SpanningForest (const SpanningForest &toCopy)
 Copy constructor.
SpanningForestoperator= (const SpanningForest &toCopy)
 Copy operator.

Detailed Description

Base class for computing min cost spanning trees or forests.

Definition at line 61 of file spanningForest.h.

Constructor & Destructor Documentation

◆ ~SpanningForest()

virtual gum::SpanningForest::~SpanningForest ( )
virtual

Destructor.

◆ SpanningForest() [1/2]

gum::SpanningForest::SpanningForest ( )
protected

default constructor

You should use SpanningForestPrim or SpanningForestKuskal to create appropriate spanning trees algorithms.

Referenced by SpanningForest(), gum::SpanningForestPrim::SpanningForestPrim(), gum::SpanningForestPrim::SpanningForestPrim(), gum::SpanningForestPrim::SpanningForestPrim(), and operator=().

Here is the caller graph for this function:

◆ SpanningForest() [2/2]

gum::SpanningForest::SpanningForest ( const SpanningForest & toCopy)
protected

Copy constructor.

References SpanningForest().

Here is the call graph for this function:

Member Function Documentation

◆ costOfSpanningForest()

virtual float gum::SpanningForest::costOfSpanningForest ( )
pure virtual

Returns the cost of the spanning forest.

Returns
cost of the spanning forest

Implemented in gum::SpanningForestPrim.

◆ edgesInSpanningForest()

virtual const EdgeSet & gum::SpanningForest::edgesInSpanningForest ( )
pure virtual

Returns the edges in a min cost spanning forest.

Returns
edges in the spanning forest

Implemented in gum::SpanningForestPrim.

◆ operator=()

SpanningForest & gum::SpanningForest::operator= ( const SpanningForest & toCopy)
protected

Copy operator.

avoid copying the interface from scratch: this would prevent, in particular, that a Prim algorithm be initialized by a Kruskal algo.

References SpanningForest().

Here is the call graph for this function:

◆ spanningForest()

virtual const UndiGraph & gum::SpanningForest::spanningForest ( )
pure virtual

Construct the spanning forest.

Returns
the spanning forest

Implemented in gum::SpanningForestPrim.


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