VTK  9.3.0
vtkUndirectedGraph.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
41 #ifndef vtkUndirectedGraph_h
42 #define vtkUndirectedGraph_h
43 
44 #include "vtkCommonDataModelModule.h" // For export macro
45 #include "vtkGraph.h"
46 
47 VTK_ABI_NAMESPACE_BEGIN
48 class VTKCOMMONDATAMODEL_EXPORT vtkUndirectedGraph : public vtkGraph
49 {
50 public:
52  vtkTypeMacro(vtkUndirectedGraph, vtkGraph);
53  void PrintSelf(ostream& os, vtkIndent indent) override;
54 
58  int GetDataObjectType() override { return VTK_UNDIRECTED_GRAPH; }
59 
64 
70 
77  void GetInEdge(vtkIdType v, vtkIdType i, vtkGraphEdge* e) override
78  {
79  this->Superclass::GetInEdge(v, i, e);
80  }
81 
83 
89 
94  void GetInEdges(vtkIdType v, vtkInEdgeIterator* it) override { Superclass::GetInEdges(v, it); }
95 
101  bool IsStructureValid(vtkGraph* g) override;
102 
103 protected:
106 
110  void GetInEdges(vtkIdType v, const vtkInEdgeType*& edges, vtkIdType& nedges) override;
111 
112 private:
113  vtkUndirectedGraph(const vtkUndirectedGraph&) = delete;
114  void operator=(const vtkUndirectedGraph&) = delete;
115 };
116 
117 VTK_ABI_NAMESPACE_END
118 #endif
Representation of a single graph edge.
Definition: vtkGraphEdge.h:25
Base class for graph data types.
Definition: vtkGraph.h:290
Iterates through all incoming edges to a vertex.
a simple class to control print indentation
Definition: vtkIndent.h:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
An undirected graph.
int GetDataObjectType() override
Return what type of dataset this is.
static vtkUndirectedGraph * GetData(vtkInformationVector *v, int i=0)
Retrieve a graph from an information vector.
vtkInEdgeType GetInEdge(vtkIdType v, vtkIdType i) override
Random-access method for retrieving the in edges of a vertex.
void GetInEdges(vtkIdType v, const vtkInEdgeType *&edges, vtkIdType &nedges) override
For iterators, returns the same edge list as GetOutEdges().
void GetInEdges(vtkIdType v, vtkInEdgeIterator *it) override
Initialize the iterator to get the incoming edges to a vertex.
static vtkUndirectedGraph * GetData(vtkInformation *info)
Retrieve a graph from an information vector.
bool IsStructureValid(vtkGraph *g) override
Check the structure, and accept it if it is a valid undirected graph.
~vtkUndirectedGraph() override
vtkIdType GetInDegree(vtkIdType v) override
Returns the full degree of the vertex.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void GetInEdge(vtkIdType v, vtkIdType i, vtkGraphEdge *e) override
Random-access method for retrieving incoming edges to vertex v.
static vtkUndirectedGraph * New()
@ info
Definition: vtkX3D.h:376
std::pair< boost::graph_traits< vtkGraph * >::edge_iterator, boost::graph_traits< vtkGraph * >::edge_iterator > edges(vtkGraph *g)
int vtkIdType
Definition: vtkType.h:315
#define VTK_UNDIRECTED_GRAPH
Definition: vtkType.h:89