VTK
vtkBoostPrimMinimumSpanningTree.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: Visualization Toolkit
4 Module: vtkBoostPrimMinimumSpanningTree.h
5 
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19  -------------------------------------------------------------------------*/
48 #ifndef vtkBoostPrimMinimumSpanningTree_h
49 #define vtkBoostPrimMinimumSpanningTree_h
50 
51 #include "vtkInfovisBoostGraphAlgorithmsModule.h" // For export macro
52 #include "vtkStdString.h" // For string type
53 #include "vtkVariant.h" // For variant type
54 
55 #include "vtkTreeAlgorithm.h"
56 
57 class VTKINFOVISBOOSTGRAPHALGORITHMS_EXPORT vtkBoostPrimMinimumSpanningTree : public vtkTreeAlgorithm
58 {
59 public:
62  void PrintSelf(ostream& os, vtkIndent indent);
63 
65 
69  vtkSetStringMacro(EdgeWeightArrayName);
71 
74  void SetOriginVertex(vtkIdType index);
75 
80  void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
81 
83 
85  vtkSetMacro(CreateGraphVertexIdArray, bool);
86  vtkGetMacro(CreateGraphVertexIdArray, bool);
87  vtkBooleanMacro(CreateGraphVertexIdArray, bool);
89 
91 
95  void SetNegateEdgeWeights(bool value);
96  vtkGetMacro(NegateEdgeWeights, bool);
97  vtkBooleanMacro(NegateEdgeWeights, bool);
99 
100 protected:
103 
104  int RequestData(
105  vtkInformation *,
108 
110  int port, vtkInformation* info);
111 
112 private:
113  char* EdgeWeightArrayName;
114  vtkIdType OriginVertexIndex;
115  vtkVariant OriginValue;
116  bool CreateGraphVertexIdArray;
117  bool ArrayNameSet;
118  char* ArrayName;
119  bool NegateEdgeWeights;
120  float EdgeWeightMultiplier;
121 
123 
124  vtkSetStringMacro(ArrayName);
126 
128 
130  vtkIdType GetVertexIndex(
131  vtkAbstractArray *abstract,vtkVariant value);
133 
135  void operator=(const vtkBoostPrimMinimumSpanningTree&); // Not implemented.
136 };
137 
138 #endif
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:46
Superclass for algorithms that produce only Tree as output.
Store vtkAlgorithm input/output information.
Abstract superclass for all arrays.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Contructs a minimum spanning tree from a graph, start node, and the weighting array.
int vtkIdType
Definition: vtkType.h:275
void PrintSelf(ostream &os, vtkIndent indent)
A atomic type representing the union of many types.
Definition: vtkVariant.h:78
a simple class to control print indentation
Definition: vtkIndent.h:38
Store zero or more vtkInformation instances.
static vtkTreeAlgorithm * New()
virtual int FillInputPortInformation(int port, vtkInformation *info)