VTK  9.0.20210510
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 
43 {
44 public:
45  std::vector<vtkInEdgeType> InEdges;
46  std::vector<vtkOutEdgeType> OutEdges;
47 };
48 
49 //----------------------------------------------------------------------------
50 // class vtkGraphInternals
51 //----------------------------------------------------------------------------
52 class VTKCOMMONDATAMODEL_EXPORT vtkGraphInternals : public vtkObject
53 {
54 public:
56 
57  vtkTypeMacro(vtkGraphInternals, vtkObject);
58  void PrintSelf(ostream& os, vtkIndent indent) override;
59 
60  std::vector<vtkVertexAdjacencyList> Adjacency;
61 
63 
67 
68  // Whether we have used pedigree IDs to refer to the vertices of the
69  // graph, e.g., to add edges or vertices. In a distributed graph,
70  // the pedigree-id interface is mutually exclusive with the
71  // no-argument AddVertex() function in vtkMutableUndirectedGraph and
72  // vtkMutableDirectedGraph.
74 
78  void RemoveEdgeFromOutList(vtkIdType e, std::vector<vtkOutEdgeType>& outEdges);
79 
83  void RemoveEdgeFromInList(vtkIdType e, std::vector<vtkInEdgeType>& inEdges);
84 
88  void ReplaceEdgeFromOutList(vtkIdType from, vtkIdType to, std::vector<vtkOutEdgeType>& outEdges);
89 
93  void ReplaceEdgeFromInList(vtkIdType from, vtkIdType to, std::vector<vtkInEdgeType>& inEdges);
94 
95 protected:
97  ~vtkGraphInternals() override;
98 
99 private:
100  vtkGraphInternals(const vtkGraphInternals&) = delete;
101  void operator=(const vtkGraphInternals&) = delete;
102 };
103 
104 #endif // vtkGraphInternals_h
vtkGraphInternals
Internal representation of vtkGraph.
Definition: vtkGraphInternals.h:53
vtkGraphInternals::New
static vtkGraphInternals * New()
vtkIdType
int vtkIdType
Definition: vtkType.h:338
vtkGraphInternals::UsingPedigreeIds
bool UsingPedigreeIds
Definition: vtkGraphInternals.h:73
vtkGraphInternals::ReplaceEdgeFromInList
void ReplaceEdgeFromInList(vtkIdType from, vtkIdType to, std::vector< vtkInEdgeType > &inEdges)
Convenience method for renaming an edge in an in edge list.
vtkVertexAdjacencyList
Definition: vtkGraphInternals.h:43
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:63
vtkGraphInternals::vtkGraphInternals
vtkGraphInternals()
vtkGraphInternals::NumberOfEdges
vtkIdType NumberOfEdges
Definition: vtkGraphInternals.h:62
vtkVertexAdjacencyList::InEdges
std::vector< vtkInEdgeType > InEdges
Definition: vtkGraphInternals.h:45
vtkGraphInternals::LastRemoteEdgeSource
vtkIdType LastRemoteEdgeSource
Definition: vtkGraphInternals.h:65
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkGraphInternals::RemoveEdgeFromInList
void RemoveEdgeFromInList(vtkIdType e, std::vector< vtkInEdgeType > &inEdges)
Convenience method for removing an edge from an in edge list.
vtkGraphInternals::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkGraph.h
vtkVertexAdjacencyList::OutEdges
std::vector< vtkOutEdgeType > OutEdges
Definition: vtkGraphInternals.h:46
vtkObject.h
vtkGraphInternals::Adjacency
std::vector< vtkVertexAdjacencyList > Adjacency
Definition: vtkGraphInternals.h:60
vtkGraphInternals::~vtkGraphInternals
~vtkGraphInternals() override
vtkGraphInternals::RemoveEdgeFromOutList
void RemoveEdgeFromOutList(vtkIdType e, std::vector< vtkOutEdgeType > &outEdges)
Convenience method for removing an edge from an out edge list.
vtkGraphInternals::LastRemoteEdgeId
vtkIdType LastRemoteEdgeId
Definition: vtkGraphInternals.h:64
vtkGraphInternals::LastRemoteEdgeTarget
vtkIdType LastRemoteEdgeTarget
Definition: vtkGraphInternals.h:66
vtkGraphInternals::ReplaceEdgeFromOutList
void ReplaceEdgeFromOutList(vtkIdType from, vtkIdType to, std::vector< vtkOutEdgeType > &outEdges)
Convenience method for renaming an edge in an out edge list.