VTK  9.2.20230129
vtkGraphInternals.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGraphInternals.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 (c) Sandia Corporation
17  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
18 ----------------------------------------------------------------------------*/
28 #ifndef vtkGraphInternals_h
29 #define vtkGraphInternals_h
30 
31 #include "vtkCommonDataModelModule.h" // For export macro
32 #include "vtkGraph.h" // For edge types
33 #include "vtkObject.h"
34 
35 #include <map> // STL Header
36 #include <vector> // STL Header
37 
38 //----------------------------------------------------------------------------
39 // class vtkVertexAdjacencyList
40 //----------------------------------------------------------------------------
41 
42 VTK_ABI_NAMESPACE_BEGIN
44 {
45 public:
46  std::vector<vtkInEdgeType> InEdges;
47  std::vector<vtkOutEdgeType> OutEdges;
48 };
49 
50 //----------------------------------------------------------------------------
51 // class vtkGraphInternals
52 //----------------------------------------------------------------------------
53 class VTKCOMMONDATAMODEL_EXPORT vtkGraphInternals : public vtkObject
54 {
55 public:
57 
58  vtkTypeMacro(vtkGraphInternals, vtkObject);
59  void PrintSelf(ostream& os, vtkIndent indent) override;
60 
61  std::vector<vtkVertexAdjacencyList> Adjacency;
62 
64 
68 
69  // Whether we have used pedigree IDs to refer to the vertices of the
70  // graph, e.g., to add edges or vertices. In a distributed graph,
71  // the pedigree-id interface is mutually exclusive with the
72  // no-argument AddVertex() function in vtkMutableUndirectedGraph and
73  // vtkMutableDirectedGraph.
75 
79  void RemoveEdgeFromOutList(vtkIdType e, std::vector<vtkOutEdgeType>& outEdges);
80 
84  void RemoveEdgeFromInList(vtkIdType e, std::vector<vtkInEdgeType>& inEdges);
85 
89  void ReplaceEdgeFromOutList(vtkIdType from, vtkIdType to, std::vector<vtkOutEdgeType>& outEdges);
90 
94  void ReplaceEdgeFromInList(vtkIdType from, vtkIdType to, std::vector<vtkInEdgeType>& inEdges);
95 
96 protected:
98  ~vtkGraphInternals() override;
99 
100 private:
101  vtkGraphInternals(const vtkGraphInternals&) = delete;
102  void operator=(const vtkGraphInternals&) = delete;
103 };
104 
105 VTK_ABI_NAMESPACE_END
106 #endif // vtkGraphInternals_h
Internal representation of vtkGraph.
void ReplaceEdgeFromInList(vtkIdType from, vtkIdType to, std::vector< vtkInEdgeType > &inEdges)
Convenience method for renaming an edge in an in edge list.
void ReplaceEdgeFromOutList(vtkIdType from, vtkIdType to, std::vector< vtkOutEdgeType > &outEdges)
Convenience method for renaming an edge in an out edge list.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
std::vector< vtkVertexAdjacencyList > Adjacency
vtkIdType LastRemoteEdgeId
void RemoveEdgeFromOutList(vtkIdType e, std::vector< vtkOutEdgeType > &outEdges)
Convenience method for removing an edge from an out edge list.
vtkIdType LastRemoteEdgeSource
vtkIdType LastRemoteEdgeTarget
void RemoveEdgeFromInList(vtkIdType e, std::vector< vtkInEdgeType > &inEdges)
Convenience method for removing an edge from an in edge list.
static vtkGraphInternals * New()
~vtkGraphInternals() override
a simple class to control print indentation
Definition: vtkIndent.h:120
abstract base class for most VTK objects
Definition: vtkObject.h:83
std::vector< vtkInEdgeType > InEdges
std::vector< vtkOutEdgeType > OutEdges
int vtkIdType
Definition: vtkType.h:327