00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00037 #ifndef __vtkMutableDirectedGraph_h
00038 #define __vtkMutableDirectedGraph_h
00039
00040 #include "vtkDirectedGraph.h"
00041
00042 class vtkEdgeListIterator;
00043 class vtkGraphEdge;
00044 class vtkVariant;
00045
00046 class VTK_FILTERING_EXPORT vtkMutableDirectedGraph : public vtkDirectedGraph
00047 {
00048 public:
00049 static vtkMutableDirectedGraph *New();
00050 vtkTypeRevisionMacro(vtkMutableDirectedGraph, vtkDirectedGraph);
00051 void PrintSelf(ostream& os, vtkIndent indent);
00052
00059 vtkIdType AddVertex();
00060
00074 vtkIdType AddVertex(vtkVariantArray *propertyArr);
00075
00076
00078
00088 vtkIdType AddVertex(const vtkVariant& pedigreeId);
00089
00091
00096 vtkEdgeType AddEdge(vtkIdType u, vtkIdType v);
00097
00098
00100
00107 vtkEdgeType AddEdge(vtkIdType u, vtkIdType v,
00108 vtkVariantArray *propertyArr);
00110
00111
00112
00114
00121 vtkEdgeType AddEdge(const vtkVariant& u, vtkIdType v,
00122 vtkVariantArray *propertyArr = 0);
00124
00126
00133 vtkEdgeType AddEdge(vtkIdType u, const vtkVariant& v,
00134 vtkVariantArray *propertyArr = 0);
00136
00138
00144 vtkEdgeType AddEdge(const vtkVariant& u,
00145 const vtkVariant& v,
00146 vtkVariantArray *propertyArr = 0);
00147
00149
00153 void LazyAddVertex();
00154
00163 void LazyAddVertex(vtkVariantArray *propertyArr);
00164
00165
00171 void LazyAddVertex(const vtkVariant& pedigreeId);
00172
00179 void LazyAddEdge(vtkIdType u, vtkIdType v, vtkVariantArray *propertyArr = 0);
00180
00182
00189 void LazyAddEdge(const vtkVariant& u, vtkIdType v,
00190 vtkVariantArray *propertyArr = 0);
00192
00194
00200 void LazyAddEdge(vtkIdType u, const vtkVariant& v,
00201 vtkVariantArray *propertyArr = 0);
00203
00205
00211 void LazyAddEdge(const vtkVariant& u,
00212 const vtkVariant& v,
00213 vtkVariantArray *propertyArr = 0);
00214
00216
00222 vtkGraphEdge *AddGraphEdge(vtkIdType u, vtkIdType v);
00223
00225
00231 vtkIdType AddChild(vtkIdType parent,
00232 vtkVariantArray *propertyArr);
00233 vtkIdType AddChild(vtkIdType parent)
00234 { return this->AddChild(parent, 0); }
00236
00240 void RemoveVertex(vtkIdType v);
00241
00244 void RemoveEdge(vtkIdType e);
00245
00248 void RemoveVertices(vtkIdTypeArray* arr);
00249
00251 void RemoveEdges(vtkIdTypeArray* arr);
00252
00253 protected:
00254 vtkMutableDirectedGraph();
00255 ~vtkMutableDirectedGraph();
00256
00258 vtkGraphEdge *GraphEdge;
00259
00260 private:
00261 vtkMutableDirectedGraph(const vtkMutableDirectedGraph&);
00262 void operator=(const vtkMutableDirectedGraph&);
00263 };
00264
00265 #endif