00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00040 #ifndef __vtkMutableDirectedGraph_h
00041 #define __vtkMutableDirectedGraph_h
00042
00043 #include "vtkDirectedGraph.h"
00044
00045 class vtkEdgeListIterator;
00046 class vtkGraphEdge;
00047 class vtkVariant;
00048
00049 class VTK_FILTERING_EXPORT vtkMutableDirectedGraph : public vtkDirectedGraph
00050 {
00051 public:
00052 static vtkMutableDirectedGraph *New();
00053 vtkTypeMacro(vtkMutableDirectedGraph, vtkDirectedGraph);
00054 void PrintSelf(ostream& os, vtkIndent indent);
00055
00064 virtual vtkIdType SetNumberOfVertices( vtkIdType numVerts );
00065
00072 vtkIdType AddVertex();
00073
00087 vtkIdType AddVertex(vtkVariantArray *propertyArr);
00088
00099 vtkIdType AddVertex(const vtkVariant& pedigreeId);
00100
00101
00103
00107 vtkEdgeType AddEdge(vtkIdType u, vtkIdType v);
00108
00110
00111
00113
00120 vtkEdgeType AddEdge(vtkIdType u, vtkIdType v,
00121 vtkVariantArray *propertyArr);
00122
00124
00125
00127
00134 vtkEdgeType AddEdge(const vtkVariant& u, vtkIdType v,
00135 vtkVariantArray *propertyArr = 0);
00137
00139
00146 vtkEdgeType AddEdge(vtkIdType u, const vtkVariant& v,
00147 vtkVariantArray *propertyArr = 0);
00149
00151
00157 vtkEdgeType AddEdge(const vtkVariant& u,
00158 const vtkVariant& v,
00159 vtkVariantArray *propertyArr = 0);
00160
00162
00166 void LazyAddVertex();
00167
00176 void LazyAddVertex(vtkVariantArray *propertyArr);
00177
00183 void LazyAddVertex(const vtkVariant& pedigreeId);
00184
00191 void LazyAddEdge(vtkIdType u, vtkIdType v, vtkVariantArray *propertyArr = 0);
00192
00194
00201 void LazyAddEdge(const vtkVariant& u, vtkIdType v,
00202 vtkVariantArray *propertyArr = 0);
00204
00206
00212 void LazyAddEdge(vtkIdType u, const vtkVariant& v,
00213 vtkVariantArray *propertyArr = 0);
00215
00217
00223 void LazyAddEdge(const vtkVariant& u,
00224 const vtkVariant& v,
00225 vtkVariantArray *propertyArr = 0);
00227
00233 vtkGraphEdge *AddGraphEdge(vtkIdType u, vtkIdType v);
00234
00236
00242 vtkIdType AddChild(vtkIdType parent,
00243 vtkVariantArray *propertyArr);
00244 vtkIdType AddChild(vtkIdType parent)
00245 { return this->AddChild(parent, 0); }
00247
00251 void RemoveVertex(vtkIdType v);
00252
00255 void RemoveEdge(vtkIdType e);
00256
00259 void RemoveVertices(vtkIdTypeArray* arr);
00260
00262 void RemoveEdges(vtkIdTypeArray* arr);
00263
00264 protected:
00265 vtkMutableDirectedGraph();
00266 ~vtkMutableDirectedGraph();
00267
00269 vtkGraphEdge *GraphEdge;
00270
00271 private:
00272 vtkMutableDirectedGraph(const vtkMutableDirectedGraph&);
00273 void operator=(const vtkMutableDirectedGraph&);
00274 };
00275
00276 #endif