00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00036 #ifndef __vtkMutableUndirectedGraph_h
00037 #define __vtkMutableUndirectedGraph_h
00038
00039 #include "vtkUndirectedGraph.h"
00040
00041 class vtkEdgeListIterator;
00042 class vtkGraphEdge;
00043
00044 class VTK_FILTERING_EXPORT vtkMutableUndirectedGraph : public vtkUndirectedGraph
00045 {
00046 public:
00047 static vtkMutableUndirectedGraph *New();
00048 vtkTypeMacro(vtkMutableUndirectedGraph, vtkUndirectedGraph);
00049 void PrintSelf(ostream& os, vtkIndent indent);
00050
00060 virtual vtkIdType SetNumberOfVertices( vtkIdType numVerts );
00061
00068 vtkIdType AddVertex();
00069
00083 vtkIdType AddVertex(vtkVariantArray *propertyArr);
00084
00095 vtkIdType AddVertex(const vtkVariant& pedigreeId);
00096
00097
00102 vtkEdgeType AddEdge(vtkIdType u, vtkIdType v);
00103
00105
00112 vtkEdgeType AddEdge(vtkIdType u, vtkIdType v,
00113 vtkVariantArray *propertyArr);
00115
00117
00124 vtkEdgeType AddEdge(const vtkVariant& u, vtkIdType v,
00125 vtkVariantArray *propertyArr = 0);
00127
00129
00136 vtkEdgeType AddEdge(vtkIdType u, const vtkVariant& v,
00137 vtkVariantArray *propertyArr = 0);
00139
00141
00147 vtkEdgeType AddEdge(const vtkVariant& u,
00148 const vtkVariant& v,
00149 vtkVariantArray *propertyArr = 0);
00151
00152
00153
00157 void LazyAddVertex();
00158
00167 void LazyAddVertex(vtkVariantArray *propertyArr);
00168
00174 void LazyAddVertex(const vtkVariant& pedigreeId);
00175
00180 void LazyAddEdge(vtkIdType u, vtkIdType v);
00181
00188 void LazyAddEdge(vtkIdType u, vtkIdType v, vtkVariantArray *propertyArr);
00189
00191
00198 void LazyAddEdge(const vtkVariant& u, vtkIdType v,
00199 vtkVariantArray *propertyArr = 0);
00201
00203
00210 void LazyAddEdge(vtkIdType u, const vtkVariant& v,
00211 vtkVariantArray *propertyArr = 0);
00213
00215
00221 void LazyAddEdge(const vtkVariant& u,
00222 const vtkVariant& v,
00223 vtkVariantArray *propertyArr = 0);
00225
00231 vtkGraphEdge *AddGraphEdge(vtkIdType u, vtkIdType v);
00232
00236 void RemoveVertex(vtkIdType v);
00237
00240 void RemoveEdge(vtkIdType e);
00241
00244 void RemoveVertices(vtkIdTypeArray* arr);
00245
00247 void RemoveEdges(vtkIdTypeArray* arr);
00248
00249 protected:
00250 vtkMutableUndirectedGraph();
00251 ~vtkMutableUndirectedGraph();
00252
00254 vtkGraphEdge *GraphEdge;
00255
00256 private:
00257 vtkMutableUndirectedGraph(const vtkMutableUndirectedGraph&);
00258 void operator=(const vtkMutableUndirectedGraph&);
00259 };
00260
00261 #endif