VTK  9.2.6
vtkBoostBreadthFirstSearch.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkBoostBreadthFirstSearch.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-------------------------------------------------------------------------*/
46#ifndef vtkBoostBreadthFirstSearch_h
47#define vtkBoostBreadthFirstSearch_h
48
49#include "vtkInfovisBoostGraphAlgorithmsModule.h" // For export macro
50#include "vtkStdString.h" // For string type
51#include "vtkVariant.h" // For variant type
52
53#include "vtkGraphAlgorithm.h"
54
55class vtkSelection;
56
57class VTKINFOVISBOOSTGRAPHALGORITHMS_EXPORT vtkBoostBreadthFirstSearch : public vtkGraphAlgorithm
58{
59public:
62 void PrintSelf(ostream& os, vtkIndent indent) override;
63
65
70 {
71 this->SetInputConnection(1, algOutput);
72 }
74
80
88 void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
89
97 void SetOriginVertexString(char* arrayName, char* value);
98
100
104 vtkSetStringMacro(OutputArrayName);
106
108
114 vtkSetMacro(OriginFromSelection, bool);
115 vtkGetMacro(OriginFromSelection, bool);
116 vtkBooleanMacro(OriginFromSelection, bool);
118
120
125 vtkGetMacro(OutputSelection, bool);
126 vtkSetMacro(OutputSelection, bool);
127 vtkBooleanMacro(OutputSelection, bool);
129
131
136 vtkSetStringMacro(OutputSelectionType);
138
139protected:
142
144
145 int FillInputPortInformation(int port, vtkInformation* info) override;
146
147 int FillOutputPortInformation(int port, vtkInformation* info) override;
148
149private:
150 vtkIdType OriginVertexIndex;
151 char* InputArrayName;
152 char* OutputArrayName;
153 vtkVariant OriginValue;
154 bool OutputSelection;
155 bool OriginFromSelection;
156 char* OutputSelectionType;
157
159
162 vtkSetStringMacro(InputArrayName);
164
169 vtkIdType GetVertexIndex(vtkAbstractArray* abstract, vtkVariant value);
170
172 void operator=(const vtkBoostBreadthFirstSearch&) = delete;
173};
174
175#endif
Abstract superclass for all arrays.
Proxy object to connect input/output ports.
virtual void SetInputConnection(int port, vtkAlgorithmOutput *input)
Set the connection for the given input port index.
Boost breadth_first_search on a vtkGraph.
void SetOriginVertexString(char *arrayName, char *value)
Convenience method for setting the origin vertex given an array name and string value.
void SetOriginSelection(vtkSelection *s)
Convenience methods for setting the origin selection input.
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetOriginVertex(vtkStdString arrayName, vtkVariant value)
Set the breadth first search 'origin' vertex.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
static vtkBoostBreadthFirstSearch * New()
~vtkBoostBreadthFirstSearch() override
void SetOriginVertex(vtkIdType index)
Set the index (into the vertex array) of the breadth first search 'origin' vertex.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
void SetOriginSelectionConnection(vtkAlgorithmOutput *algOutput)
Convenience methods for setting the origin selection input.
Superclass for algorithms that produce only graph as output.
a simple class to control print indentation
Definition vtkIndent.h:49
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
data object that represents a "selection" in VTK.
Wrapper around std::string to keep symbols short.
A atomic type representing the union of many types.
Definition vtkVariant.h:79
int vtkIdType
Definition vtkType.h:332