VTK  9.1.0
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 -------------------------------------------------------------------------*/
55#ifndef vtkBoostPrimMinimumSpanningTree_h
56#define vtkBoostPrimMinimumSpanningTree_h
57
58#include "vtkInfovisBoostGraphAlgorithmsModule.h" // For export macro
59#include "vtkStdString.h" // For string type
60#include "vtkVariant.h" // For variant type
61
62#include "vtkTreeAlgorithm.h"
63
64class VTKINFOVISBOOSTGRAPHALGORITHMS_EXPORT vtkBoostPrimMinimumSpanningTree
65 : public vtkTreeAlgorithm
66{
67public:
70 void PrintSelf(ostream& os, vtkIndent indent) override;
71
73
80 vtkSetStringMacro(EdgeWeightArrayName);
82
88
97
99
103 vtkSetMacro(CreateGraphVertexIdArray, bool);
104 vtkGetMacro(CreateGraphVertexIdArray, bool);
105 vtkBooleanMacro(CreateGraphVertexIdArray, bool);
107
109
117 vtkGetMacro(NegateEdgeWeights, bool);
118 vtkBooleanMacro(NegateEdgeWeights, bool);
120
121protected:
124
126
128
129private:
130 char* EdgeWeightArrayName;
131 vtkIdType OriginVertexIndex;
132 vtkVariant OriginValue;
133 bool CreateGraphVertexIdArray;
134 bool ArrayNameSet;
135 char* ArrayName;
136 bool NegateEdgeWeights;
137 float EdgeWeightMultiplier;
138
140
143 vtkSetStringMacro(ArrayName);
145
150 vtkIdType GetVertexIndex(vtkAbstractArray* abstract, vtkVariant value);
151
153 void operator=(const vtkBoostPrimMinimumSpanningTree&) = delete;
154};
155
156#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:43
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:45
Superclass for algorithms that produce only Tree as output.
A atomic type representing the union of many types.
Definition: vtkVariant.h:75
@ info
Definition: vtkX3D.h:382
@ value
Definition: vtkX3D.h:226
@ port
Definition: vtkX3D.h:453
@ index
Definition: vtkX3D.h:252
int vtkIdType
Definition: vtkType.h:332