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
42#ifndef vtkBoostPrimMinimumSpanningTree_h
43#define vtkBoostPrimMinimumSpanningTree_h
44
45#include "vtkInfovisBoostGraphAlgorithmsModule.h" // For export macro
46#include "vtkStdString.h" // For string type
47#include "vtkVariant.h" // For variant type
48
49#include "vtkTreeAlgorithm.h"
50
51VTK_ABI_NAMESPACE_BEGIN
52class VTKINFOVISBOOSTGRAPHALGORITHMS_EXPORT vtkBoostPrimMinimumSpanningTree
53 : public vtkTreeAlgorithm
54{
55public:
58 void PrintSelf(ostream& os, vtkIndent indent) override;
59
61
68 vtkSetStringMacro(EdgeWeightArrayName);
70
76
84 void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
85
87
91 vtkSetMacro(CreateGraphVertexIdArray, bool);
92 vtkGetMacro(CreateGraphVertexIdArray, bool);
93 vtkBooleanMacro(CreateGraphVertexIdArray, bool);
95
97
104 void SetNegateEdgeWeights(bool value);
105 vtkGetMacro(NegateEdgeWeights, bool);
106 vtkBooleanMacro(NegateEdgeWeights, bool);
108
109protected:
112
114
115 int FillInputPortInformation(int port, vtkInformation* info) override;
116
117private:
118 char* EdgeWeightArrayName;
119 vtkIdType OriginVertexIndex;
120 vtkVariant OriginValue;
121 bool CreateGraphVertexIdArray;
122 bool ArrayNameSet;
123 char* ArrayName;
124 bool NegateEdgeWeights;
125 float EdgeWeightMultiplier;
126
128
131 vtkSetStringMacro(ArrayName);
133
138 vtkIdType GetVertexIndex(vtkAbstractArray* abstract, vtkVariant value);
139
141 void operator=(const vtkBoostPrimMinimumSpanningTree&) = delete;
142};
143
144VTK_ABI_NAMESPACE_END
145#endif
Abstract superclass for all arrays.
Constructs a minimum spanning tree from a graph, start node, and the weighting array.
static vtkBoostPrimMinimumSpanningTree * New()
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
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:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Wrapper around std::string to keep symbols short.
Superclass for algorithms that produce only Tree as output.
A type representing the union of many types.
Definition vtkVariant.h:62
int vtkIdType
Definition vtkType.h:315