218 #include "vtkCommonDataModelModule.h"
221 class vtkAdjacentVertexIterator;
223 class vtkEdgeListIterator;
224 class vtkDataSetAttributes;
227 class vtkGraphEdgePoints;
228 class vtkDistributedGraphHelper;
229 class vtkGraphInternals;
230 class vtkIdTypeArray;
232 class vtkOutEdgeIterator;
235 class vtkVertexListIterator;
237 class vtkVariantArray;
292 void PrintSelf(ostream& os, vtkIndent indent);
296 vtkGetObjectMacro(VertexData, vtkDataSetAttributes);
297 vtkGetObjectMacro(EdgeData, vtkDataSetAttributes);
310 double *GetPoint(vtkIdType ptId);
311 void GetPoint(vtkIdType ptId,
double x[3]);
319 vtkPoints* GetPoints();
320 virtual void SetPoints(vtkPoints *points);
325 void ComputeBounds();
332 void GetBounds(
double bounds[6]);
341 virtual void GetOutEdges(vtkIdType v, vtkOutEdgeIterator *it);
346 virtual vtkIdType GetDegree(vtkIdType v);
351 virtual vtkIdType GetOutDegree(vtkIdType v);
364 virtual void GetOutEdge(vtkIdType v, vtkIdType index,
vtkGraphEdge* e);
374 virtual vtkIdType GetInDegree(vtkIdType v);
379 virtual vtkInEdgeType GetInEdge(vtkIdType v, vtkIdType index);
387 virtual void GetInEdge(vtkIdType v, vtkIdType index,
vtkGraphEdge* e);
393 virtual void GetAdjacentVertices(vtkIdType v, vtkAdjacentVertexIterator *it);
398 virtual void GetEdges(vtkEdgeListIterator *it);
402 virtual vtkIdType GetNumberOfEdges();
407 virtual void GetVertices(vtkVertexListIterator *it);
411 virtual vtkIdType GetNumberOfVertices();
417 void SetDistributedGraphHelper(vtkDistributedGraphHelper *helper);
421 vtkDistributedGraphHelper *GetDistributedGraphHelper();
431 vtkIdType FindVertex(
const vtkVariant& pedigreeID);
443 virtual void CopyStructure(
vtkGraph *g);
447 virtual bool CheckedShallowCopy(
vtkGraph *g);
451 virtual bool CheckedDeepCopy(
vtkGraph *g);
454 virtual void Squeeze();
468 void ReorderOutVertices(vtkIdType v, vtkIdTypeArray *
vertices);
472 bool IsSameStructure(
vtkGraph *other);
481 vtkIdType GetSourceVertex(vtkIdType e);
482 vtkIdType GetTargetVertex(vtkIdType e);
490 void SetEdgePoints(vtkIdType e, vtkIdType npts,
double* pts);
491 void GetEdgePoints(vtkIdType e, vtkIdType& npts,
double*& pts);
496 vtkIdType GetNumberOfEdgePoints(vtkIdType e);
499 double* GetEdgePoint(vtkIdType e, vtkIdType i);
502 void ClearEdgePoints(vtkIdType e);
507 void SetEdgePoint(vtkIdType e, vtkIdType i,
double x[3]);
508 void SetEdgePoint(vtkIdType e, vtkIdType i,
double x,
double y,
double z)
509 {
double p[3] = {x, y, z}; this->SetEdgePoint(e, i, p); }
515 void AddEdgePoint(vtkIdType e,
double x[3]);
517 {
double p[3] = {x, y, z}; this->AddEdgePoint(e, p); }
523 void ShallowCopyEdgePoints(
vtkGraph* g);
524 void DeepCopyEdgePoints(
vtkGraph* g);
530 vtkGraphInternals *GetGraphInternals(
bool modifying);
534 void GetInducedEdges(vtkIdTypeArray* verts, vtkIdTypeArray*
edges);
555 vtkIdType GetEdgeId(vtkIdType a, vtkIdType b);
574 void AddVertexInternal(vtkVariantArray *propertyArr = 0,
575 vtkIdType *vertex = 0);
582 void AddVertexInternal(
const vtkVariant& pedigree, vtkIdType *vertex);
589 void AddEdgeInternal(vtkIdType u, vtkIdType v,
bool directed,
591 void AddEdgeInternal(
const vtkVariant& uPedigree, vtkIdType v,
bool directed,
593 void AddEdgeInternal(vtkIdType u,
const vtkVariant& vPedigree,
bool directed,
595 void AddEdgeInternal(
const vtkVariant& uPedigree,
const vtkVariant& vPedigree,
596 bool directed, vtkVariantArray *propertyArr,
602 void RemoveVertexInternal(vtkIdType v,
bool directed);
606 void RemoveEdgeInternal(vtkIdType e,
bool directed);
610 void RemoveVerticesInternal(vtkIdTypeArray* arr,
bool directed);
614 void RemoveEdgesInternal(vtkIdTypeArray* arr,
bool directed);
620 virtual bool IsStructureValid(
vtkGraph *g) = 0;
623 virtual void CopyInternal(
vtkGraph *g,
bool deep);
632 void SetInternals(vtkGraphInternals* internals);
638 void SetEdgePoints(vtkGraphEdgePoints* edgePoints);
642 void ForceOwnership();
647 virtual void GetInEdges(vtkIdType v,
const vtkInEdgeType *&
edges, vtkIdType & nedges);
651 void BuildEdgeList();
656 friend class vtkAdjacentVertexIterator;
657 friend class vtkEdgeListIterator;
659 friend class vtkOutEdgeIterator;
681 static double DefaultPoint[3];
686 vtkGetObjectMacro(EdgeList, vtkIdTypeArray);
687 virtual void SetEdgeList(vtkIdTypeArray* list);
virtual int GetDataObjectType()
static vtkDataObject * GetData(vtkInformation *info)
vtkDataSetAttributes * VertexData
vtkDataSetAttributes * EdgeData
virtual vtkFieldData * GetAttributesAsFieldData(int type)
vtkIdTypeArray * EdgeList
vtksys_stl::pair< boost::graph_traits< vtkGraph * >::vertex_iterator, boost::graph_traits< vtkGraph * >::vertex_iterator > vertices(vtkGraph *g)
vtksys_stl::pair< boost::graph_traits< vtkGraph * >::edge_iterator, boost::graph_traits< vtkGraph * >::edge_iterator > edges(vtkGraph *g)
bool VTKCOMMONDATAMODEL_EXPORT operator!=(vtkEdgeBase e1, vtkEdgeBase e2)
unsigned long int GetMTime()
Representation of a single graph edge.
vtkEdgeBase(vtkIdType id)
virtual void Initialize()
vtkDistributedGraphHelper * DistributedHelper
Base class for graph data types.
bool VTKCOMMONDATAMODEL_EXPORT operator==(vtkEdgeBase e1, vtkEdgeBase e2)
VTKCOMMONDATAMODEL_EXPORT ostream & operator<<(ostream &out, vtkEdgeBase e)
vtkGraphEdgePoints * EdgePoints
void SetEdgePoint(vtkIdType e, vtkIdType i, double x, double y, double z)
Iterates through all incoming edges to a vertex.
void PrintSelf(ostream &os, vtkIndent indent)
virtual vtkIdType GetNumberOfElements(int type)
object to represent cell connectivity
vtkOutEdgeType(vtkIdType t, vtkIdType id)
vtkGraphInternals * Internals
general representation of visualization data
vtkInEdgeType(vtkIdType s, vtkIdType id)
virtual void DeepCopy(vtkDataObject *src)
vtkEdgeType(vtkIdType s, vtkIdType t, vtkIdType id)
void AddEdgePoint(vtkIdType e, double x, double y, double z)
virtual void ShallowCopy(vtkDataObject *src)