VTK  9.3.1
vtkCollapseVerticesByArray.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
21 #ifndef vtkCollapseVerticesByArray_h
22 #define vtkCollapseVerticesByArray_h
23 
24 #include "vtkGraphAlgorithm.h"
25 #include "vtkInfovisCoreModule.h" // For export macro
26 
27 VTK_ABI_NAMESPACE_BEGIN
28 class vtkCollapseVerticesByArrayInternal;
29 
30 class VTKINFOVISCORE_EXPORT vtkCollapseVerticesByArray : public vtkGraphAlgorithm
31 {
32 public:
35 
36  void PrintSelf(ostream& os, vtkIndent indent) override;
37 
39 
42  vtkGetMacro(AllowSelfLoops, bool);
43  vtkSetMacro(AllowSelfLoops, bool);
44  vtkBooleanMacro(AllowSelfLoops, bool);
46 
51  void AddAggregateEdgeArray(const char* arrName);
52 
56  void ClearAggregateEdgeArray();
57 
59 
62  vtkGetStringMacro(VertexArray);
63  vtkSetStringMacro(VertexArray);
65 
67 
70  vtkGetMacro(CountEdgesCollapsed, bool);
71  vtkSetMacro(CountEdgesCollapsed, bool);
72  vtkBooleanMacro(CountEdgesCollapsed, bool);
74 
76 
80  vtkGetStringMacro(EdgesCollapsedArray);
81  vtkSetStringMacro(EdgesCollapsedArray);
83 
85 
88  vtkGetMacro(CountVerticesCollapsed, bool);
89  vtkSetMacro(CountVerticesCollapsed, bool);
90  vtkBooleanMacro(CountVerticesCollapsed, bool);
92 
94 
98  vtkGetStringMacro(VerticesCollapsedArray);
99  vtkSetStringMacro(VerticesCollapsedArray);
101 
102 protected:
104  ~vtkCollapseVerticesByArray() override;
105 
109  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
110  vtkInformationVector* outputVector) override;
111 
116 
120  vtkGraph* Create(vtkGraph* inGraph);
121 
125  void FindEdge(vtkGraph* outGraph, vtkIdType source, vtkIdType target, vtkIdType& edgeId);
126 
127 private:
130  void operator=(const vtkCollapseVerticesByArray&) = delete;
132 
133 protected:
135  char* VertexArray;
136 
139 
142 
143  vtkCollapseVerticesByArrayInternal* Internal;
144 };
145 
146 VTK_ABI_NAMESPACE_END
147 #endif // vtkCollapseVerticesByArray_h__
static vtkGraphAlgorithm * New()
Store vtkAlgorithm input/output information.
Collapse the graph given a vertex array.
int vtkIdType
Definition: vtkType.h:315
Superclass for algorithms that produce only graph as output.
Base class for graph data types.
Definition: vtkGraph.h:280
a simple class to control print indentation
Definition: vtkIndent.h:28
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
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.
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
vtkCollapseVerticesByArrayInternal * Internal
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
Store zero or more vtkInformation instances.