VTK  9.1.0
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{
44public:
45 std::vector<vtkInEdgeType> InEdges;
46 std::vector<vtkOutEdgeType> OutEdges;
47};
48
49//----------------------------------------------------------------------------
50// class vtkGraphInternals
51//----------------------------------------------------------------------------
52class VTKCOMMONDATAMODEL_EXPORT vtkGraphInternals : public vtkObject
53{
54public:
56
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
95protected:
98
99private:
100 vtkGraphInternals(const vtkGraphInternals&) = delete;
101 void operator=(const vtkGraphInternals&) = delete;
102};
103
104#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:113
abstract base class for most VTK objects
Definition: vtkObject.h:73
std::vector< vtkInEdgeType > InEdges
std::vector< vtkOutEdgeType > OutEdges
int vtkIdType
Definition: vtkType.h:332