 |
VTK
9.0.20210304
|
Go to the documentation of this file.
213 #include "vtkCommonDataModelModule.h"
222 class vtkGraphEdgePoints;
238 class vtk_edge_iterator;
239 class vtk_out_edge_pointer_iterator;
240 class vtk_in_edge_pointer_iterator;
594 double p[3] = { x, y, z };
595 this->SetEdgePoint(e, i, p);
604 double p[3] = { x, y, z };
605 this->AddEdgePoint(e, p);
819 static double DefaultPoint[3];
833 void operator=(
const vtkGraph&) =
delete;
represent and manipulate 3D points
vtkInEdgeType(vtkIdType s, vtkIdType id)
void AddEdgePoint(vtkIdType e, double x, double y, double z)
virtual void GetOutEdge(vtkIdType v, vtkIdType index, vtkGraphEdge *e)
Random-access method for retrieving outgoing edges from vertex v.
VTKCOMMONDATAMODEL_EXPORT ostream & operator<<(ostream &out, vtkEdgeBase e)
virtual void GetInEdges(vtkIdType v, const vtkInEdgeType *&edges, vtkIdType &nedges)
int GetDataObjectType() override
Return what type of dataset this is.
helper for the vtkGraph class that allows the graph to be distributed across multiple memory spaces.
vtkDistributedGraphHelper * GetDistributedGraphHelper()
Retrieves the distributed graph helper for this graph.
vtkPoints * Points
The vertex locations.
Internal representation of vtkGraph.
void GetEdgePoints(vtkIdType e, vtkIdType &npts, double *&pts)
double * GetEdgePoint(vtkIdType e, vtkIdType i)
Get the x,y,z location of a point along edge e.
void Initialize() override
Initialize to an empty graph.
vtkIdType GetNumberOfEdgePoints(vtkIdType e)
Get the number of edge points associated with an edge.
vtkGraphInternals * Internals
The adjacency list internals of this graph.
vtkTimeStamp ComputeTime
Time at which bounds were computed.
represent and manipulate attribute data in a dataset
virtual vtkIdType GetNumberOfVertices()
The number of vertices in the graph.
void SetDistributedGraphHelper(vtkDistributedGraphHelper *helper)
Sets the distributed graph helper of this graph, turning it into a distributed graph.
record modification and/or execution time
void RemoveVertexInternal(vtkIdType v, bool directed)
Removes a vertex from the graph, along with any adjacent edges.
static vtkGraph * GetData(vtkInformation *info)
Retrieve a graph from an information vector.
virtual void SetPoints(vtkPoints *points)
void ComputeBounds()
Compute the bounds of the graph.
void AddEdgeInternal(vtkIdType u, const vtkVariant &vPedigree, bool directed, vtkVariantArray *propertyArr, vtkEdgeType *edge)
void AddEdgeInternal(const vtkVariant &uPedigree, const vtkVariant &vPedigree, bool directed, vtkVariantArray *propertyArr, vtkEdgeType *edge)
void AddVertexInternal(const vtkVariant &pedigree, vtkIdType *vertex)
Adds a vertex with the given pedigree ID to the graph.
vtkEdgeBase(vtkIdType id)
vtkGraphInternals * GetGraphInternals(bool modifying)
Returns the internal representation of the graph.
void DeepCopy(vtkDataObject *obj) override
Deep copies the data object into this graph.
void AddEdgePoint(vtkIdType e, const double x[3])
Adds a point to the end of the list of edge points for a certain edge.
Forward declaration required for Boost serialization.
virtual vtkIdType GetNumberOfEdges()
The number of edges in the graph.
void GetBounds(double bounds[6])
Iterates through all incoming edges to a vertex.
virtual vtkOutEdgeType GetOutEdge(vtkIdType v, vtkIdType index)
Random-access method for retrieving outgoing edges from vertex v.
An array holding vtkVariants.
void BuildEdgeList()
Builds a mapping from edge id to source/target vertex id.
double * GetPoint(vtkIdType ptId)
These methods return the point (0,0,0) until the points structure is created, when it returns the act...
void Dump()
Dump the contents of the graph to standard output.
virtual void CopyInternal(vtkGraph *g, bool deep)
Copy internal data structure.
void SetEdgePoint(vtkIdType e, vtkIdType i, const double x[3])
Set an x,y,z location of a point along an edge.
void ForceOwnership()
If this instance does not own its internals, it makes a copy of the internals.
vtkFieldData * GetAttributesAsFieldData(int type) override
Returns the attributes of the data object as a vtkFieldData.
represent and manipulate fields of data
void GetInducedEdges(vtkIdTypeArray *verts, vtkIdTypeArray *edges)
Fills a list of edge indices with the edges contained in the induced subgraph formed by the vertices ...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetEdgePoints(vtkGraphEdgePoints *edgePoints)
Private method for setting edge points.
vtkDataSetAttributes * VertexData
The vertex and edge data.
void AddEdgeInternal(vtkIdType u, vtkIdType v, bool directed, vtkVariantArray *propertyArr, vtkEdgeType *edge)
Protected method for adding edges of a certain directedness used by mutable subclasses.
virtual bool IsStructureValid(vtkGraph *g)=0
Subclasses override this method to accept the structure based on their requirements.
bool VTKCOMMONDATAMODEL_EXPORT operator!=(vtkEdgeBase e1, vtkEdgeBase e2)
bool VTKCOMMONDATAMODEL_EXPORT operator==(vtkEdgeBase e1, vtkEdgeBase e2)
vtkIdTypeArray * EdgeList
virtual bool CheckedDeepCopy(vtkGraph *g)
Performs the same operation as DeepCopy(), but instead of reporting an error for an incompatible grap...
virtual void GetInEdge(vtkIdType v, vtkIdType index, vtkGraphEdge *e)
Random-access method for retrieving incoming edges to vertex v.
#define VTK_SIZEHINT(...)
void RemoveVerticesInternal(vtkIdTypeArray *arr, bool directed)
Removes a collection of vertices from the graph, along with any adjacent edges.
void DeepCopyEdgePoints(vtkGraph *g)
virtual vtkIdType GetOutDegree(vtkIdType v)
The number of outgoing edges from vertex v.
void ClearEdgePoints(vtkIdType e)
Clear all points associated with an edge.
virtual bool CheckedShallowCopy(vtkGraph *g)
Performs the same operation as ShallowCopy(), but instead of reporting an error for an incompatible g...
void RemoveEdgeInternal(vtkIdType e, bool directed)
Removes an edge from the graph.
virtual vtkIdType GetInDegree(vtkIdType v)
The number of incoming edges to vertex v.
vtkOutEdgeType(vtkIdType t, vtkIdType id)
Representation of a single graph edge.
virtual vtkIdType GetDegree(vtkIdType v)
The total of all incoming and outgoing vertices for vertex v.
bool ToUndirectedGraph(vtkUndirectedGraph *g)
Convert the graph to an undirected graph.
vtkIdType GetEdgeId(vtkIdType a, vtkIdType b)
Returns the Id of the edge between vertex a and vertex b.
a simple class to control print indentation
object to represent cell connectivity
virtual void SetEdgeList(vtkIdTypeArray *list)
A atomic type representing the union of many types.
Iterates through all edges in a graph.
Iterates through all outgoing edges from a vertex.
vtkIdType GetNumberOfElements(int type) override
Get the number of elements for a specific attribute type (VERTEX, EDGE, etc.).
vtkIdType GetTargetVertex(vtkIdType e)
void GetPoint(vtkIdType ptId, double x[3])
virtual void GetAdjacentVertices(vtkIdType v, vtkAdjacentVertexIterator *it)
Initializes the adjacent vertex iterator to iterate over all outgoing vertices from vertex v.
vtkGraphEdgePoints * EdgePoints
The structure for holding the edge points.
Iterates through adjacent vertices in a graph.
vtkEdgeType(vtkIdType s, vtkIdType t, vtkIdType id)
virtual void GetVertices(vtkVertexListIterator *it)
Initializes the vertex list iterator to iterate over all vertices in the graph.
vtkDataSetAttributes * EdgeData
virtual void GetOutEdges(vtkIdType v, vtkOutEdgeIterator *it)
Initializes the out edge iterator to iterate over all outgoing edges of vertex v.
bool ToDirectedGraph(vtkDirectedGraph *g)
Convert the graph to a directed graph.
void ShallowCopy(vtkDataObject *obj) override
Shallow copies the data object into this graph.
void SetEdgePoints(vtkIdType e, vtkIdType npts, const double pts[])
Get/Set the internal edge control points associated with each edge.
virtual void GetEdges(vtkEdgeListIterator *it)
Initializes the edge list iterator to iterate over all edges in the graph.
dynamic, self-adjusting array of vtkIdType
virtual void GetInEdges(vtkIdType v, vtkInEdgeIterator *it)
Initializes the in edge iterator to iterate over all incoming edges to vertex v.
void ShallowCopyEdgePoints(vtkGraph *g)
Copy the internal edge point data from another graph into this graph.
bool IsSameStructure(vtkGraph *other)
Returns true if both graphs point to the same adjacency structure.
void ReorderOutVertices(vtkIdType v, vtkIdTypeArray *vertices)
Reorder the outgoing vertices of a vertex.
void SetEdgePoint(vtkIdType e, vtkIdType i, double x, double y, double z)
void SetInternals(vtkGraphInternals *internals)
Private method for setting internals.
std::pair< boost::graph_traits< vtkGraph * >::edge_iterator, boost::graph_traits< vtkGraph * >::edge_iterator > edges(vtkGraph *g)
vtkDistributedGraphHelper * DistributedHelper
The distributed graph helper.
double * GetBounds()
Return a pointer to the geometry bounding box in the form (xmin,xmax, ymin,ymax, zmin,...
vtkIdType FindVertex(const vtkVariant &pedigreeID)
Retrieve the vertex with the given pedigree ID.
Iterates all vertices in a graph.
std::pair< boost::graph_traits< vtkGraph * >::vertex_iterator, boost::graph_traits< vtkGraph * >::vertex_iterator > vertices(vtkGraph *g)
void AddVertexInternal(vtkVariantArray *propertyArr=nullptr, vtkIdType *vertex=nullptr)
Protected method for adding vertices, optionally with properties, used by mutable subclasses.
Base class for graph data types.
virtual void GetOutEdges(vtkIdType v, const vtkOutEdgeType *&edges, vtkIdType &nedges)
Fast access functions for iterators.
general representation of visualization data
virtual void CopyStructure(vtkGraph *g)
Does a shallow copy of the topological information, but not the associated attributes.
virtual vtkInEdgeType GetInEdge(vtkIdType v, vtkIdType index)
Random-access method for retrieving incoming edges to vertex v.
void RemoveEdgesInternal(vtkIdTypeArray *arr, bool directed)
Removes a collection of edges from the graph.
vtkIdType GetSourceVertex(vtkIdType e)
Retrieve the source and target vertices for an edge id.
vtkMTimeType GetMTime() override
The modified time of the graph.
vtkPoints * GetPoints()
Returns the points array for this graph.
unsigned long GetActualMemorySize() override
Return the actual size of the data in kibibytes (1024 bytes).
void AddEdgeInternal(const vtkVariant &uPedigree, vtkIdType v, bool directed, vtkVariantArray *propertyArr, vtkEdgeType *edge)
virtual void Squeeze()
Reclaim unused memory.
vtkTypeUInt32 vtkMTimeType
static vtkGraph * GetData(vtkInformationVector *v, int i=0)