VTK  9.3.0
vtkBoostPrimMinimumSpanningTree.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
33 #ifndef vtkBoostPrimMinimumSpanningTree_h
34 #define vtkBoostPrimMinimumSpanningTree_h
35 
36 #include "vtkInfovisBoostGraphAlgorithmsModule.h" // For export macro
37 #include "vtkStdString.h" // For string type
38 #include "vtkVariant.h" // For variant type
39 
40 #include "vtkTreeAlgorithm.h"
41 
42 VTK_ABI_NAMESPACE_BEGIN
43 class VTKINFOVISBOOSTGRAPHALGORITHMS_EXPORT vtkBoostPrimMinimumSpanningTree
44  : public vtkTreeAlgorithm
45 {
46 public:
49  void PrintSelf(ostream& os, vtkIndent indent) override;
50 
52 
59  vtkSetStringMacro(EdgeWeightArrayName);
61 
67 
76 
78 
82  vtkSetMacro(CreateGraphVertexIdArray, bool);
83  vtkGetMacro(CreateGraphVertexIdArray, bool);
84  vtkBooleanMacro(CreateGraphVertexIdArray, bool);
86 
88 
96  vtkGetMacro(NegateEdgeWeights, bool);
97  vtkBooleanMacro(NegateEdgeWeights, bool);
99 
100 protected:
103 
105 
107 
108 private:
109  char* EdgeWeightArrayName;
110  vtkIdType OriginVertexIndex;
111  vtkVariant OriginValue;
112  bool CreateGraphVertexIdArray;
113  bool ArrayNameSet;
114  char* ArrayName;
115  bool NegateEdgeWeights;
116  float EdgeWeightMultiplier;
117 
119 
122  vtkSetStringMacro(ArrayName);
124 
129  vtkIdType GetVertexIndex(vtkAbstractArray* abstract, vtkVariant value);
130 
132  void operator=(const vtkBoostPrimMinimumSpanningTree&) = delete;
133 };
134 
135 VTK_ABI_NAMESPACE_END
136 #endif
Abstract superclass for all arrays.
Constructs a minimum spanning tree from a graph, start node, and the weighting array.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
static vtkBoostPrimMinimumSpanningTree * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetNegateEdgeWeights(bool value)
Whether to negate the edge weights.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
void SetOriginVertex(vtkIdType index)
Set the index (into the vertex array) of the minimum spanning tree 'origin' vertex.
void SetOriginVertex(vtkStdString arrayName, vtkVariant value)
Set the minimum spanning tree 'origin' vertex.
a simple class to control print indentation
Definition: vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:29
Superclass for algorithms that produce only Tree as output.
A type representing the union of many types.
Definition: vtkVariant.h:53
@ info
Definition: vtkX3D.h:376
@ value
Definition: vtkX3D.h:220
@ port
Definition: vtkX3D.h:447
@ index
Definition: vtkX3D.h:246
int vtkIdType
Definition: vtkType.h:315