VTK
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  -------------------------------------------------------------------------*/
46 #ifndef vtkBoostPrimMinimumSpanningTree_h
47 #define vtkBoostPrimMinimumSpanningTree_h
48 
49 #include "vtkInfovisBoostGraphAlgorithmsModule.h" // For export macro
50 #include "vtkStdString.h" // For string type
51 #include "vtkVariant.h" // For variant type
52 
53 #include "vtkTreeAlgorithm.h"
54 
55 class VTKINFOVISBOOSTGRAPHALGORITHMS_EXPORT vtkBoostPrimMinimumSpanningTree : public vtkTreeAlgorithm
56 {
57 public:
60  void PrintSelf(ostream& os, vtkIndent indent) override;
61 
63 
70  vtkSetStringMacro(EdgeWeightArrayName);
72 
77  void SetOriginVertex(vtkIdType index);
78 
86  void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
87 
89 
93  vtkSetMacro(CreateGraphVertexIdArray, bool);
94  vtkGetMacro(CreateGraphVertexIdArray, bool);
95  vtkBooleanMacro(CreateGraphVertexIdArray, bool);
97 
99 
106  void SetNegateEdgeWeights(bool value);
107  vtkGetMacro(NegateEdgeWeights, bool);
108  vtkBooleanMacro(NegateEdgeWeights, bool);
110 
111 protected:
114 
115  int RequestData(
116  vtkInformation *,
118  vtkInformationVector *) override;
119 
121  int port, vtkInformation* info) override;
122 
123 private:
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(
145  vtkAbstractArray *abstract,vtkVariant value);
146 
148  void operator=(const vtkBoostPrimMinimumSpanningTree&) = delete;
149 };
150 
151 #endif
vtkStdString.h
vtkVariant.h
vtkX3D::value
Definition: vtkX3D.h:220
vtkIdType
int vtkIdType
Definition: vtkType.h:347
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkTreeAlgorithm.h
vtkX3D::port
Definition: vtkX3D.h:447
vtkTreeAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkTreeAlgorithm::New
static vtkTreeAlgorithm * New()
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkVariant
A atomic type representing the union of many types.
Definition: vtkVariant.h:65
vtkTreeAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTreeAlgorithm
Superclass for algorithms that produce only Tree as output.
Definition: vtkTreeAlgorithm.h:45
vtkTreeAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkAbstractArray
Abstract superclass for all arrays.
Definition: vtkAbstractArray.h:75
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:80
vtkX3D::info
Definition: vtkX3D.h:376
vtkBoostPrimMinimumSpanningTree
Constructs a minimum spanning tree from a graph, start node, and the weighting array.
Definition: vtkBoostPrimMinimumSpanningTree.h:55
vtkStdString
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:34
vtkX3D::index
Definition: vtkX3D.h:246