VTK  9.4.20241218
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
51VTK_ABI_NAMESPACE_BEGIN
52class VTKINFOVISBOOSTGRAPHALGORITHMS_EXPORT vtkBoostBreadthFirstSearchTree : public vtkTreeAlgorithm
53{
54public:
57 void PrintSelf(ostream& os, vtkIndent indent) override;
58
64
72 void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
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
93protected:
96
97 int FillInputPortInformation(int port, vtkInformation* info) override;
98
100
101private:
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
126VTK_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.
Superclass for algorithms that produce only Tree as output.
A type representing the union of many types.
Definition vtkVariant.h:162
int vtkIdType
Definition vtkType.h:315