VTK  9.0.20200603
vtkUndirectedGraph.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkUndirectedGraph.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 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
42 #ifndef vtkUndirectedGraph_h
43 #define vtkUndirectedGraph_h
44 
45 #include "vtkCommonDataModelModule.h" // For export macro
46 #include "vtkGraph.h"
47 
48 class VTKCOMMONDATAMODEL_EXPORT vtkUndirectedGraph : public vtkGraph
49 {
50 public:
51  static vtkUndirectedGraph* New();
52  vtkTypeMacro(vtkUndirectedGraph, vtkGraph);
53  void PrintSelf(ostream& os, vtkIndent indent) override;
54 
58  int GetDataObjectType() override { return VTK_UNDIRECTED_GRAPH; }
59 
63  vtkIdType GetInDegree(vtkIdType v) override;
64 
70 
77  void GetInEdge(vtkIdType v, vtkIdType i, vtkGraphEdge* e) override
78  {
79  this->Superclass::GetInEdge(v, i, e);
80  }
81 
83 
87  static vtkUndirectedGraph* GetData(vtkInformationVector* v, int i = 0);
89 
94  void GetInEdges(vtkIdType v, vtkInEdgeIterator* it) override { Superclass::GetInEdges(v, it); }
95 
101  bool IsStructureValid(vtkGraph* g) override;
102 
103 protected:
105  ~vtkUndirectedGraph() override;
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 #endif
vtkUndirectedGraph::GetDataObjectType
int GetDataObjectType() override
Return what type of dataset this is.
Definition: vtkUndirectedGraph.h:58
vtkUndirectedGraph
An undirected graph.
Definition: vtkUndirectedGraph.h:48
vtkIdType
int vtkIdType
Definition: vtkType.h:330
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkGraph::GetData
static vtkGraph * GetData(vtkInformation *info)
Retrieve a graph from an information vector.
vtkInEdgeIterator
Iterates through all incoming edges to a vertex.
Definition: vtkInEdgeIterator.h:45
vtkInEdgeType
Definition: vtkGraph.h:265
vtkUndirectedGraph::GetInEdges
void GetInEdges(vtkIdType v, vtkInEdgeIterator *it) override
Initialize the iterator to get the incoming edges to a vertex.
Definition: vtkUndirectedGraph.h:94
VTK_UNDIRECTED_GRAPH
#define VTK_UNDIRECTED_GRAPH
Definition: vtkType.h:101
vtkGraph::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkGraph::IsStructureValid
virtual bool IsStructureValid(vtkGraph *g)=0
Subclasses override this method to accept the structure based on their requirements.
vtkGraph::GetInDegree
virtual vtkIdType GetInDegree(vtkIdType v)
The number of incoming edges to vertex v.
vtkGraphEdge
Representation of a single graph edge.
Definition: vtkGraphEdge.h:39
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkGraph.h
vtkUndirectedGraph::GetInEdge
void GetInEdge(vtkIdType v, vtkIdType i, vtkGraphEdge *e) override
Random-access method for retrieving incoming edges to vertex v.
Definition: vtkUndirectedGraph.h:77
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkX3D::info
Definition: vtkX3D.h:382
vtkGraph::GetInEdges
virtual void GetInEdges(vtkIdType v, vtkInEdgeIterator *it)
Initializes the in edge iterator to iterate over all incoming edges to vertex v.
edges
std::pair< boost::graph_traits< vtkGraph * >::edge_iterator, boost::graph_traits< vtkGraph * >::edge_iterator > edges(vtkGraph *g)
Definition: vtkBoostGraphAdapter.h:988
vtkGraph
Base class for graph data types.
Definition: vtkGraph.h:289
vtkGraph::GetInEdge
virtual vtkInEdgeType GetInEdge(vtkIdType v, vtkIdType index)
Random-access method for retrieving incoming edges to vertex v.
vtkDataObject::New
static vtkDataObject * New()