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  -------------------------------------------------------------------------*/
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 : public vtkTreeAlgorithm
59 {
60 public:
63  void PrintSelf(ostream& os, vtkIndent indent) override;
64 
66 
73  vtkSetStringMacro(EdgeWeightArrayName);
75 
80  void SetOriginVertex(vtkIdType index);
81 
89  void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
90 
92 
96  vtkSetMacro(CreateGraphVertexIdArray, bool);
97  vtkGetMacro(CreateGraphVertexIdArray, bool);
98  vtkBooleanMacro(CreateGraphVertexIdArray, bool);
100 
102 
109  void SetNegateEdgeWeights(bool value);
110  vtkGetMacro(NegateEdgeWeights, bool);
111  vtkBooleanMacro(NegateEdgeWeights, bool);
113 
114 protected:
117 
118  int RequestData(
119  vtkInformation *,
121  vtkInformationVector *) override;
122 
124  int port, vtkInformation* info) override;
125 
126 private:
127  char* EdgeWeightArrayName;
128  vtkIdType OriginVertexIndex;
129  vtkVariant OriginValue;
130  bool CreateGraphVertexIdArray;
131  bool ArrayNameSet;
132  char* ArrayName;
133  bool NegateEdgeWeights;
134  float EdgeWeightMultiplier;
135 
137 
140  vtkSetStringMacro(ArrayName);
142 
147  vtkIdType GetVertexIndex(
148  vtkAbstractArray *abstract,vtkVariant value);
149 
151  void operator=(const vtkBoostPrimMinimumSpanningTree&) = delete;
152 };
153 
154 #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:40
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:347
A atomic type representing the union of many types.
Definition: vtkVariant.h:71
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.