VTK  9.2.6
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  -------------------------------------------------------------------------*/
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 
58 class VTKINFOVISBOOSTGRAPHALGORITHMS_EXPORT vtkBoostPrimMinimumSpanningTree
59  : public vtkTreeAlgorithm
60 {
61 public:
64  void PrintSelf(ostream& os, vtkIndent indent) override;
65 
67 
74  vtkSetStringMacro(EdgeWeightArrayName);
76 
81  void SetOriginVertex(vtkIdType index);
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 
115 protected:
118 
120 
121  int FillInputPortInformation(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(vtkAbstractArray* abstract, vtkVariant value);
145 
147  void operator=(const vtkBoostPrimMinimumSpanningTree&) = delete;
148 };
149 
150 #endif
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:38
Superclass for algorithms that produce only Tree as output.
Store vtkAlgorithm input/output information.
Abstract superclass for all arrays.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
Constructs a minimum spanning tree from a graph, start node, and the weighting array.
int vtkIdType
Definition: vtkType.h:332
A atomic type representing the union of many types.
Definition: vtkVariant.h:69
a simple class to control print indentation
Definition: vtkIndent.h:39
Store zero or more vtkInformation instances.
static vtkTreeAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.