VTK
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 -------------------------------------------------------------------------*/
47 #ifndef vtkUndirectedGraph_h
48 #define vtkUndirectedGraph_h
49 
50 #include "vtkCommonDataModelModule.h" // For export macro
51 #include "vtkGraph.h"
52 
54 {
55 public:
56  static vtkUndirectedGraph *New();
57  vtkTypeMacro(vtkUndirectedGraph, vtkGraph);
58  void PrintSelf(ostream& os, vtkIndent indent);
59 
61  virtual int GetDataObjectType() {return VTK_UNDIRECTED_GRAPH;}
62 
64  virtual vtkIdType GetInDegree(vtkIdType v);
65 
66  //BTX
68 
71  //ETX
73 
75 
79  virtual void GetInEdge(vtkIdType v, vtkIdType i, vtkGraphEdge* e)
80  { this->Superclass::GetInEdge(v, i, e); }
82 
83  //BTX
85 
87  static vtkUndirectedGraph *GetData(vtkInformationVector *v, int i=0);
88  //ETX
90 
92 
94  virtual void GetInEdges(vtkIdType v, vtkInEdgeIterator *it)
95  { Superclass::GetInEdges(v, it); }
97 
100  virtual bool IsStructureValid(vtkGraph *g);
101 
102 protected:
105 
106  //BTX
108 
109  virtual void GetInEdges(vtkIdType v, const vtkInEdgeType *& edges, vtkIdType & nedges);
110  //ETX
112 
113 private:
114  vtkUndirectedGraph(const vtkUndirectedGraph&); // Not implemented.
115  void operator=(const vtkUndirectedGraph&); // Not implemented.
116 };
117 
118 #endif
static vtkDataObject * New()
Store vtkAlgorithm input/output information.
vtksys_stl::pair< boost::graph_traits< vtkGraph * >::edge_iterator, boost::graph_traits< vtkGraph * >::edge_iterator > edges(vtkGraph *g)
#define VTK_UNDIRECTED_GRAPH
Definition: vtkType.h:90
An undirected graph.
Representation of a single graph edge.
Definition: vtkGraphEdge.h:38
static vtkGraph * GetData(vtkInformation *info)
int vtkIdType
Definition: vtkType.h:275
virtual void GetInEdges(vtkIdType v, vtkInEdgeIterator *it)
virtual void GetInEdge(vtkIdType v, vtkIdType i, vtkGraphEdge *e)
virtual vtkInEdgeType GetInEdge(vtkIdType v, vtkIdType index)
Base class for graph data types.
Definition: vtkGraph.h:288
a simple class to control print indentation
Definition: vtkIndent.h:38
Iterates through all incoming edges to a vertex.
virtual void GetInEdges(vtkIdType v, vtkInEdgeIterator *it)
virtual vtkIdType GetInDegree(vtkIdType v)
void PrintSelf(ostream &os, vtkIndent indent)
virtual bool IsStructureValid(vtkGraph *g)=0
Store zero or more vtkInformation instances.
#define VTKCOMMONDATAMODEL_EXPORT
virtual int GetDataObjectType()