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 -------------------------------------------------------------------------*/
49#ifndef vtkBoostPrimMinimumSpanningTree_h
50#define vtkBoostPrimMinimumSpanningTree_h
51
52#include "vtkInfovisBoostGraphAlgorithmsModule.h" // For export macro
53#include "vtkStdString.h" // For string type
54#include "vtkVariant.h" // For variant type
55
56#include "vtkTreeAlgorithm.h"
57
58class VTKINFOVISBOOSTGRAPHALGORITHMS_EXPORT vtkBoostPrimMinimumSpanningTree
59 : public vtkTreeAlgorithm
60{
61public:
64 void PrintSelf(ostream& os, vtkIndent indent) override;
65
67
74 vtkSetStringMacro(EdgeWeightArrayName);
76
82
90 void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
91
93
97 vtkSetMacro(CreateGraphVertexIdArray, bool);
98 vtkGetMacro(CreateGraphVertexIdArray, bool);
99 vtkBooleanMacro(CreateGraphVertexIdArray, bool);
101
103
110 void SetNegateEdgeWeights(bool value);
111 vtkGetMacro(NegateEdgeWeights, bool);
112 vtkBooleanMacro(NegateEdgeWeights, bool);
114
115protected:
118
120
121 int FillInputPortInformation(int port, vtkInformation* info) override;
122
123private:
124 char* EdgeWeightArrayName;
125 vtkIdType OriginVertexIndex;
126 vtkVariant OriginValue;
127 bool CreateGraphVertexIdArray;
128 bool ArrayNameSet;
129 char* ArrayName;
130 bool NegateEdgeWeights;
131 float EdgeWeightMultiplier;
132
134
137 vtkSetStringMacro(ArrayName);
139
144 vtkIdType GetVertexIndex(vtkAbstractArray* abstract, vtkVariant value);
145
147 void operator=(const vtkBoostPrimMinimumSpanningTree&) = delete;
148};
149
150#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:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:39
Superclass for algorithms that produce only Tree as output.
A atomic type representing the union of many types.
Definition: vtkVariant.h:70
int vtkIdType
Definition: vtkType.h:332