VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
vtkBoostPrimMinimumSpanningTree Class Reference

Contructs a minimum spanning tree from a graph, start node, and the weighting array. More...

#include <vtkBoostPrimMinimumSpanningTree.h>

Inherits vtkTreeAlgorithm.

Public Types

typedef vtkTreeAlgorithm Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 
vtkBoostPrimMinimumSpanningTreeNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
void SetOriginVertex (vtkIdType index)
 
void SetOriginVertex (vtkStdString arrayName, vtkVariant value)
 
virtual void SetEdgeWeightArrayName (const char *)
 
virtual void SetCreateGraphVertexIdArray (bool)
 
virtual bool GetCreateGraphVertexIdArray ()
 
virtual void CreateGraphVertexIdArrayOn ()
 
virtual void CreateGraphVertexIdArrayOff ()
 
void SetNegateEdgeWeights (bool value)
 
virtual bool GetNegateEdgeWeights ()
 
virtual void NegateEdgeWeightsOn ()
 
virtual void NegateEdgeWeightsOff ()
 

Static Public Member Functions

static
vtkBoostPrimMinimumSpanningTree
New ()
 
static int IsTypeOf (const char *type)
 
static
vtkBoostPrimMinimumSpanningTree
SafeDownCast (vtkObjectBase *o)
 

Protected Member Functions

virtual vtkObjectBase * NewInstanceInternal () const
 
 vtkBoostPrimMinimumSpanningTree ()
 
 ~vtkBoostPrimMinimumSpanningTree ()
 
int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 
int FillInputPortInformation (int port, vtkInformation *info)
 

Detailed Description

Contructs a minimum spanning tree from a graph, start node, and the weighting array.

This vtk class uses the Boost Prim Minimum Spanning Tree generic algorithm to perform a minimum spanning tree creation given a weighting value for each of the edges in the input graph and a a starting node for the tree. A couple of caveats to be noted with the Prim implementation versus the Kruskal implementation:

  1. The negate edge weights function cannot be utilized to obtain a 'maximal' spanning tree (an exception is thrown when negated edge weights exist), and
  2. the Boost implementation of the Prim algorithm returns a vertex predecessor map which results in some ambiguity about which edge from the original graph should be utilized if parallel edges between nodes exist; therefore, the current VTK implementation does not copy the edge data from the graph to the new tree.

    See Also
    vtkGraph vtkBoostGraphAdapter
    Tests:
    vtkBoostPrimMinimumSpanningTree (Tests)

Definition at line 57 of file vtkBoostPrimMinimumSpanningTree.h.

Member Typedef Documentation

Definition at line 61 of file vtkBoostPrimMinimumSpanningTree.h.

Constructor & Destructor Documentation

vtkBoostPrimMinimumSpanningTree::vtkBoostPrimMinimumSpanningTree ( )
protected
vtkBoostPrimMinimumSpanningTree::~vtkBoostPrimMinimumSpanningTree ( )
protected

Member Function Documentation

static vtkBoostPrimMinimumSpanningTree* vtkBoostPrimMinimumSpanningTree::New ( )
static
static int vtkBoostPrimMinimumSpanningTree::IsTypeOf ( const char *  type)
static
virtual int vtkBoostPrimMinimumSpanningTree::IsA ( const char *  type)
virtual
static vtkBoostPrimMinimumSpanningTree* vtkBoostPrimMinimumSpanningTree::SafeDownCast ( vtkObjectBase *  o)
static
virtual vtkObjectBase* vtkBoostPrimMinimumSpanningTree::NewInstanceInternal ( ) const
protectedvirtual
vtkBoostPrimMinimumSpanningTree* vtkBoostPrimMinimumSpanningTree::NewInstance ( ) const
void vtkBoostPrimMinimumSpanningTree::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual void vtkBoostPrimMinimumSpanningTree::SetEdgeWeightArrayName ( const char *  )
virtual

Set the name of the edge-weight input array, which must name an array that is part of the edge data of the input graph and contains numeric data. If the edge-weight array is not of type vtkDoubleArray, the array will be copied into a temporary vtkDoubleArray.

void vtkBoostPrimMinimumSpanningTree::SetOriginVertex ( vtkIdType  index)

Set the index (into the vertex array) of the minimum spanning tree 'origin' vertex.

void vtkBoostPrimMinimumSpanningTree::SetOriginVertex ( vtkStdString  arrayName,
vtkVariant  value 
)

Set the minimum spanning tree 'origin' vertex. This method is basically the same as above but allows the application to simply specify an array name and value, instead of having to know the specific index of the vertex.

virtual void vtkBoostPrimMinimumSpanningTree::SetCreateGraphVertexIdArray ( bool  )
virtual

Stores the graph vertex ids for the tree vertices in an array named "GraphVertexId". Default is off.

virtual bool vtkBoostPrimMinimumSpanningTree::GetCreateGraphVertexIdArray ( )
virtual

Stores the graph vertex ids for the tree vertices in an array named "GraphVertexId". Default is off.

virtual void vtkBoostPrimMinimumSpanningTree::CreateGraphVertexIdArrayOn ( )
virtual

Stores the graph vertex ids for the tree vertices in an array named "GraphVertexId". Default is off.

virtual void vtkBoostPrimMinimumSpanningTree::CreateGraphVertexIdArrayOff ( )
virtual

Stores the graph vertex ids for the tree vertices in an array named "GraphVertexId". Default is off.

void vtkBoostPrimMinimumSpanningTree::SetNegateEdgeWeights ( bool  value)

Whether to negate the edge weights. By negating the edge weights this algorithm will give you the 'maximal' spanning tree (i.e. the algorithm will try to create a spanning tree with the highest weighted edges). Defaulted to Off. FIXME: put a real definition in...

virtual bool vtkBoostPrimMinimumSpanningTree::GetNegateEdgeWeights ( )
virtual

Whether to negate the edge weights. By negating the edge weights this algorithm will give you the 'maximal' spanning tree (i.e. the algorithm will try to create a spanning tree with the highest weighted edges). Defaulted to Off. FIXME: put a real definition in...

virtual void vtkBoostPrimMinimumSpanningTree::NegateEdgeWeightsOn ( )
virtual

Whether to negate the edge weights. By negating the edge weights this algorithm will give you the 'maximal' spanning tree (i.e. the algorithm will try to create a spanning tree with the highest weighted edges). Defaulted to Off. FIXME: put a real definition in...

virtual void vtkBoostPrimMinimumSpanningTree::NegateEdgeWeightsOff ( )
virtual

Whether to negate the edge weights. By negating the edge weights this algorithm will give you the 'maximal' spanning tree (i.e. the algorithm will try to create a spanning tree with the highest weighted edges). Defaulted to Off. FIXME: put a real definition in...

int vtkBoostPrimMinimumSpanningTree::RequestData ( vtkInformation *  ,
vtkInformationVector **  ,
vtkInformationVector *   
)
protected
int vtkBoostPrimMinimumSpanningTree::FillInputPortInformation ( int  port,
vtkInformation *  info 
)
protected

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