47#ifndef GUM_SPANNING_FOREST_PRIM_H
48#define GUM_SPANNING_FOREST_PRIM_H
A priorityQueue is a heap in which each element has a mutable priority.
UndiGraph _spanning_tree_
the computed spanning tree
SpanningForestPrim(const UndiGraph *graph, const EdgeProperty< float > *costTable)
Default constructor.
float costOfSpanningForest()
Returns the cost of the spanning forest.
void _compute_()
Computes the spanning forest.
const EdgeProperty< float > & _costTable_
the costs of the edges
const EdgeSet & edgesInSpanningForest()
Returns the edges in a min cost spanning forest.
bool _require_computation_
a Boolean indicating whether we need recompute the spanning tree
SpanningForestPrim & operator=(const SpanningForestPrim &toCopy)
Copy operator: private to prevent using it.
const UndiGraph & spanningForest()
Construct the spanning forest.
void _computeInAComponent_(const NodeId id)
compute a spanning tree in a given connected component of graph
float _spanning_tree_cost_
the cost of the spanning tree
void _exploreNode_(const NodeId id)
explore the neighborhood of a node belonging to the spanning tree
virtual ~SpanningForestPrim()
Destructor.
PriorityQueue< Edge, float > _edgesToExplore_
the next edges that may be added to the spanning tree
const UndiGraph & _graph_
the graph the spanning tree of which we wish to compute
SpanningForest()
default constructor
Base class for undirected graphs.
Set< Edge > EdgeSet
Some typdefs and define for shortcuts ...
Size NodeId
Type for node ids.
HashTable< Edge, VAL > EdgeProperty
Property on graph elements.
gum is the global namespace for all aGrUM entities
priority queues (in which an element cannot appear more than once)
Interface for computing min cost spanning trees or forests.