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
00062 vtkIdType AddVertex();
00063
00077 vtkIdType AddVertex(vtkVariantArray *propertyArr);
00078
00079
00081
00091 vtkIdType AddVertex(const vtkVariant& pedigreeId);
00092
00094
00099 vtkEdgeType AddEdge(vtkIdType u, vtkIdType v);
00100
00101
00103
00110 vtkEdgeType AddEdge(vtkIdType u, vtkIdType v,
00111 vtkVariantArray *propertyArr);
00113
00114
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);
00150
00152
00156 void LazyAddVertex();
00157
00166 void LazyAddVertex(vtkVariantArray *propertyArr);
00167
00168
00174 void LazyAddVertex(const vtkVariant& pedigreeId);
00175
00182 void LazyAddEdge(vtkIdType u, vtkIdType v, vtkVariantArray *propertyArr = 0);
00183
00185
00192 void LazyAddEdge(const vtkVariant& u, vtkIdType v,
00193 vtkVariantArray *propertyArr = 0);
00195
00197
00203 void LazyAddEdge(vtkIdType u, const vtkVariant& v,
00204 vtkVariantArray *propertyArr = 0);
00206
00208
00214 void LazyAddEdge(const vtkVariant& u,
00215 const vtkVariant& v,
00216 vtkVariantArray *propertyArr = 0);
00217
00219
00225 vtkGraphEdge *AddGraphEdge(vtkIdType u, vtkIdType v);
00226
00228
00234 vtkIdType AddChild(vtkIdType parent,
00235 vtkVariantArray *propertyArr);
00236 vtkIdType AddChild(vtkIdType parent)
00237 { return this->AddChild(parent, 0); }
00239
00243 void RemoveVertex(vtkIdType v);
00244
00247 void RemoveEdge(vtkIdType e);
00248
00251 void RemoveVertices(vtkIdTypeArray* arr);
00252
00254 void RemoveEdges(vtkIdTypeArray* arr);
00255
00256 protected:
00257 vtkMutableDirectedGraph();
00258 ~vtkMutableDirectedGraph();
00259
00261 vtkGraphEdge *GraphEdge;
00262
00263 private:
00264 vtkMutableDirectedGraph(const vtkMutableDirectedGraph&);
00265 void operator=(const vtkMutableDirectedGraph&);
00266 };
00267
00268 #endif