VTK  9.2.6
vtkBoostPrimMinimumSpanningTree.h
Go to the documentation of this file.
1/*=========================================================================
2
3Program: Visualization Toolkit
4Module: vtkBoostPrimMinimumSpanningTree.h
5
6Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7All rights reserved.
8See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10This software is distributed WITHOUT ANY WARRANTY; without even
11the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12PURPOSE. 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 -------------------------------------------------------------------------*/
58#ifndef vtkBoostPrimMinimumSpanningTree_h
59#define vtkBoostPrimMinimumSpanningTree_h
60
61#include "vtkInfovisBoostGraphAlgorithmsModule.h" // For export macro
62#include "vtkStdString.h" // For string type
63#include "vtkVariant.h" // For variant type
64
65#include "vtkTreeAlgorithm.h"
66
67class VTKINFOVISBOOSTGRAPHALGORITHMS_EXPORT vtkBoostPrimMinimumSpanningTree
68 : public vtkTreeAlgorithm
69{
70public:
73 void PrintSelf(ostream& os, vtkIndent indent) override;
74
76
83 vtkSetStringMacro(EdgeWeightArrayName);
85
91
99 void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
100
102
106 vtkSetMacro(CreateGraphVertexIdArray, bool);
107 vtkGetMacro(CreateGraphVertexIdArray, bool);
108 vtkBooleanMacro(CreateGraphVertexIdArray, bool);
110
112
119 void SetNegateEdgeWeights(bool value);
120 vtkGetMacro(NegateEdgeWeights, bool);
121 vtkBooleanMacro(NegateEdgeWeights, bool);
123
124protected:
127
129
130 int FillInputPortInformation(int port, vtkInformation* info) override;
131
132private:
133 char* EdgeWeightArrayName;
134 vtkIdType OriginVertexIndex;
135 vtkVariant OriginValue;
136 bool CreateGraphVertexIdArray;
137 bool ArrayNameSet;
138 char* ArrayName;
139 bool NegateEdgeWeights;
140 float EdgeWeightMultiplier;
141
143
146 vtkSetStringMacro(ArrayName);
148
153 vtkIdType GetVertexIndex(vtkAbstractArray* abstract, vtkVariant value);
154
156 void operator=(const vtkBoostPrimMinimumSpanningTree&) = delete;
157};
158
159#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:49
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 atomic type representing the union of many types.
Definition vtkVariant.h:79
int vtkIdType
Definition vtkType.h:332