VTK  9.3.1
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 
66  void SetOriginVertex(vtkIdType index);
67 
75  void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
76 
78 
82  vtkSetMacro(CreateGraphVertexIdArray, bool);
83  vtkGetMacro(CreateGraphVertexIdArray, bool);
84  vtkBooleanMacro(CreateGraphVertexIdArray, bool);
86 
88 
95  void SetNegateEdgeWeights(bool value);
96  vtkGetMacro(NegateEdgeWeights, bool);
97  vtkBooleanMacro(NegateEdgeWeights, bool);
99 
100 protected:
103 
105 
106  int FillInputPortInformation(int port, vtkInformation* info) override;
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
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:28
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)
This is called by the superclass.
Constructs a minimum spanning tree from a graph, start node, and the weighting array.
int vtkIdType
Definition: vtkType.h:315
A type representing the union of many types.
Definition: vtkVariant.h:52
a simple class to control print indentation
Definition: vtkIndent.h:28
Store zero or more vtkInformation instances.
static vtkTreeAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.