VTK  9.6.1
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
31
32#ifndef vtkUndirectedGraph_h
33#define vtkUndirectedGraph_h
34
35#include "vtkCommonDataModelModule.h" // For export macro
36#include "vtkGraph.h"
37#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
38
39VTK_ABI_NAMESPACE_BEGIN
40class VTKCOMMONDATAMODEL_EXPORT VTK_MARSHALAUTO vtkUndirectedGraph : public vtkGraph
41{
42public:
45 void PrintSelf(ostream& os, vtkIndent indent) override;
46
50 int GetDataObjectType() VTK_FUTURE_CONST override { return VTK_UNDIRECTED_GRAPH; }
51
56
62
69 void GetInEdge(vtkIdType v, vtkIdType i, vtkGraphEdge* e) override
70 {
71 this->Superclass::GetInEdge(v, i, e);
72 }
73
75
81
87
93 bool IsStructureValid(vtkGraph* g) override;
94
95protected:
98
102 void GetInEdges(vtkIdType v, const vtkInEdgeType*& edges, vtkIdType& nedges) override;
103
104private:
105 vtkUndirectedGraph(const vtkUndirectedGraph&) = delete;
106 void operator=(const vtkUndirectedGraph&) = delete;
107};
108
109VTK_ABI_NAMESPACE_END
110#endif
Representation of a single graph edge.
friend class vtkInEdgeIterator
Friend iterator classes.
Definition vtkGraph.h:782
virtual vtkInEdgeType GetInEdge(vtkIdType v, vtkIdType index)
Random-access method for retrieving incoming edges to vertex v.
virtual void GetInEdges(vtkIdType v, vtkInEdgeIterator *it)
Initializes the in edge iterator to iterate over all incoming edges to vertex v.
a simple class to control print indentation
Definition vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
int GetDataObjectType() VTK_FUTURE_CONST override
Return what type of dataset this is.
vtkInEdgeType GetInEdge(vtkIdType v, vtkIdType i) override
Random-access method for retrieving the in edges of a vertex.
static vtkUndirectedGraph * New()
static vtkUndirectedGraph * GetData(vtkInformationVector *v, int i=0)
Retrieve a graph from an information vector.
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.
bool IsStructureValid(vtkGraph *g) override
Check the structure, and accept it if it is a valid undirected graph.
static vtkUndirectedGraph * GetData(vtkInformation *info)
Retrieve a graph from an information vector.
~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.
std::pair< boost::graph_traits< vtkGraph * >::edge_iterator, boost::graph_traits< vtkGraph * >::edge_iterator > edges(vtkGraph *g)
int vtkIdType
Definition vtkType.h:368
@ VTK_UNDIRECTED_GRAPH
Definition vtkType.h:137
#define VTK_MARSHALAUTO