VTK  9.2.5
vtkBoostPrimMinimumSpanningTree.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: Visualization Toolkit
4 Module: vtkBoostPrimMinimumSpanningTree.h
5 
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. 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  -------------------------------------------------------------------------*/
78 #ifndef vtkBoostPrimMinimumSpanningTree_h
79 #define vtkBoostPrimMinimumSpanningTree_h
80 
81 #include "vtkInfovisBoostGraphAlgorithmsModule.h" // For export macro
82 #include "vtkStdString.h" // For string type
83 #include "vtkVariant.h" // For variant type
84 
85 #include "vtkTreeAlgorithm.h"
86 
87 class VTKINFOVISBOOSTGRAPHALGORITHMS_EXPORT vtkBoostPrimMinimumSpanningTree
88  : public vtkTreeAlgorithm
89 {
90 public:
93  void PrintSelf(ostream& os, vtkIndent indent) override;
94 
96 
103  vtkSetStringMacro(EdgeWeightArrayName);
105 
111 
120 
122 
126  vtkSetMacro(CreateGraphVertexIdArray, bool);
127  vtkGetMacro(CreateGraphVertexIdArray, bool);
128  vtkBooleanMacro(CreateGraphVertexIdArray, bool);
130 
132 
140  vtkGetMacro(NegateEdgeWeights, bool);
141  vtkBooleanMacro(NegateEdgeWeights, bool);
143 
144 protected:
147 
149 
151 
152 private:
153  char* EdgeWeightArrayName;
154  vtkIdType OriginVertexIndex;
155  vtkVariant OriginValue;
156  bool CreateGraphVertexIdArray;
157  bool ArrayNameSet;
158  char* ArrayName;
159  bool NegateEdgeWeights;
160  float EdgeWeightMultiplier;
161 
163 
166  vtkSetStringMacro(ArrayName);
168 
173  vtkIdType GetVertexIndex(vtkAbstractArray* abstract, vtkVariant value);
174 
176  void operator=(const vtkBoostPrimMinimumSpanningTree&) = delete;
177 };
178 
179 #endif
Abstract superclass for all arrays.
Constructs a minimum spanning tree from a graph, start node, and the weighting array.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
static vtkBoostPrimMinimumSpanningTree * New()
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:119
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:108
Superclass for algorithms that produce only Tree as output.
A atomic type representing the union of many types.
Definition: vtkVariant.h:159
@ 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