VTK: Infovis/BoostGraphAlgorithms/vtkBoostBreadthFirstSearchTree.h Source File

| VTK 9.3.1

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
32 #ifndef vtkBoostBreadthFirstSearchTree_h
33 #define vtkBoostBreadthFirstSearchTree_h
34
35 #include "vtkInfovisBoostGraphAlgorithmsModule.h" // For export macro
36 #include "vtkStdString.h" // For string type
37 #include "vtkVariant.h" // For variant type
38
39 #include "vtkTreeAlgorithm.h"
40
41 VTK_ABI_NAMESPACE_BEGIN
42 class VTKINFOVISBOOSTGRAPHALGORITHMS_EXPORT vtkBoostBreadthFirstSearchTree : public vtkTreeAlgorithm
43 {
44 public:
45 static vtkBoostBreadthFirstSearchTree* New();
46 vtkTypeMacro(vtkBoostBreadthFirstSearchTree, vtkTreeAlgorithm);
47 void PrintSelf(ostream& os, vtkIndent indent) override;
48
53 void SetOriginVertex(vtkIdType index);
54
62 void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
63
65
69 vtkSetMacro(CreateGraphVertexIdArray, bool);
70 vtkGetMacro(CreateGraphVertexIdArray, bool);
71 vtkBooleanMacro(CreateGraphVertexIdArray, bool);
73
75
78 vtkSetMacro(ReverseEdges, bool);
79 vtkGetMacro(ReverseEdges, bool);
80 vtkBooleanMacro(ReverseEdges, bool);
82
83 protected:
84 vtkBoostBreadthFirstSearchTree();
85 ~vtkBoostBreadthFirstSearchTree() override;
86
87 int FillInputPortInformation(int port, vtkInformation* info) override;
88
89 int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
90
91 private:
92 vtkIdType OriginVertexIndex;
93 char* ArrayName;
94 vtkVariant OriginValue;
95 bool ArrayNameSet;
96 bool CreateGraphVertexIdArray;
97 bool ReverseEdges;
98
100
103 vtkSetStringMacro(ArrayName);
105
110 vtkIdType GetVertexIndex(vtkAbstractArray* abstract, vtkVariant value);
111
112 vtkBoostBreadthFirstSearchTree(const vtkBoostBreadthFirstSearchTree&) = delete;
113 void operator=(const vtkBoostBreadthFirstSearchTree&) = delete;
114 };
115
116 VTK_ABI_NAMESPACE_END
117 #endif
vtkAbstractArray
Abstract superclass for all arrays.
Definition: vtkAbstractArray.h:76
vtkBoostBreadthFirstSearchTree
Constructs a BFS tree from a graph.
Definition: vtkBoostBreadthFirstSearchTree.h:43
vtkBoostBreadthFirstSearchTree::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkBoostBreadthFirstSearchTree::vtkBoostBreadthFirstSearchTree
vtkBoostBreadthFirstSearchTree()
vtkBoostBreadthFirstSearchTree::SetOriginVertex
void SetOriginVertex(vtkStdString arrayName, vtkVariant value)
Set the breadth first search 'origin' vertex.
vtkBoostBreadthFirstSearchTree::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkBoostBreadthFirstSearchTree::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkBoostBreadthFirstSearchTree::New
static vtkBoostBreadthFirstSearchTree * New()
vtkBoostBreadthFirstSearchTree::~vtkBoostBreadthFirstSearchTree
~vtkBoostBreadthFirstSearchTree() override
vtkBoostBreadthFirstSearchTree::SetOriginVertex
void SetOriginVertex(vtkIdType index)
Set the index (into the vertex array) of the breadth first search 'origin' vertex.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkStdString
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:38
vtkTreeAlgorithm
Superclass for algorithms that produce only Tree as output.
Definition: vtkTreeAlgorithm.h:34
vtkVariant
A type representing the union of many types.
Definition: vtkVariant.h:62
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkX3D::value
@ value
Definition: vtkX3D.h:220
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkX3D::index
@ index
Definition: vtkX3D.h:246
vtkStdString.h
vtkTreeAlgorithm.h
vtkIdType
int vtkIdType
Definition: vtkType.h:315
vtkVariant.h