VTK  9.3.20240328
vtkBoostBreadthFirstSearchTree.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
42 #ifndef vtkBoostBreadthFirstSearchTree_h
43 #define vtkBoostBreadthFirstSearchTree_h
44 
45 #include "vtkInfovisBoostGraphAlgorithmsModule.h" // For export macro
46 #include "vtkStdString.h" // For string type
47 #include "vtkVariant.h" // For variant type
48 
49 #include "vtkTreeAlgorithm.h"
50 
51 VTK_ABI_NAMESPACE_BEGIN
52 class VTKINFOVISBOOSTGRAPHALGORITHMS_EXPORT vtkBoostBreadthFirstSearchTree : public vtkTreeAlgorithm
53 {
54 public:
57  void PrintSelf(ostream& os, vtkIndent indent) override;
58 
64 
73 
75 
79  vtkSetMacro(CreateGraphVertexIdArray, bool);
80  vtkGetMacro(CreateGraphVertexIdArray, bool);
81  vtkBooleanMacro(CreateGraphVertexIdArray, bool);
83 
85 
88  vtkSetMacro(ReverseEdges, bool);
89  vtkGetMacro(ReverseEdges, bool);
90  vtkBooleanMacro(ReverseEdges, bool);
92 
93 protected:
96 
98 
100 
101 private:
102  vtkIdType OriginVertexIndex;
103  char* ArrayName;
104  vtkVariant OriginValue;
105  bool ArrayNameSet;
106  bool CreateGraphVertexIdArray;
107  bool ReverseEdges;
108 
110 
113  vtkSetStringMacro(ArrayName);
115 
120  vtkIdType GetVertexIndex(vtkAbstractArray* abstract, vtkVariant value);
121 
123  void operator=(const vtkBoostBreadthFirstSearchTree&) = delete;
124 };
125 
126 VTK_ABI_NAMESPACE_END
127 #endif
Abstract superclass for all arrays.
Constructs a BFS tree from a graph.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void SetOriginVertex(vtkStdString arrayName, vtkVariant value)
Set the breadth first search 'origin' vertex.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
static vtkBoostBreadthFirstSearchTree * New()
~vtkBoostBreadthFirstSearchTree() override
void SetOriginVertex(vtkIdType index)
Set the index (into the vertex array) of the breadth first search 'origin' vertex.
a simple class to control print indentation
Definition: vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:78
Superclass for algorithms that produce only Tree as output.
A type representing the union of many types.
Definition: vtkVariant.h:162
@ info
Definition: vtkX3D.h:376
@ value
Definition: vtkX3D.h:220
@ port
Definition: vtkX3D.h:447
@ index
Definition: vtkX3D.h:246
int vtkIdType
Definition: vtkType.h:315