Go to the documentation of this file.
53 #ifndef vtkDistributedGraphHelper_h
54 #define vtkDistributedGraphHelper_h
56 #include "vtkCommonDataModelModule.h"
59 class vtkDistributedGraphHelperInternals;
75 (
const vtkVariant& pedigreeId,
void* userData);
286 #endif // vtkDistributedGraphHelper_h
virtual void AddVertexInternal(vtkVariantArray *propertyArr, vtkIdType *vertex)=0
Add a vertex, optionally with properties, to the distributed graph.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
helper for the vtkGraph class that allows the graph to be distributed across multiple memory spaces.
static vtkInformationIntegerKey * DISTRIBUTEDVERTEXIDS()
Information Keys that distributed graphs can append to attribute arrays to flag them as containing di...
virtual void AddEdgeInternal(const vtkVariant &uPedigreeId, vtkIdType v, bool directed, vtkVariantArray *propertyArr, vtkEdgeType *edge)=0
Adds an edge (u, v) and returns the new edge.
virtual void Synchronize()=0
Synchronizes all of the processors involved in this distributed graph, so that all processors have a ...
virtual void AddEdgeInternal(vtkIdType u, const vtkVariant &vPedigreeId, bool directed, vtkVariantArray *propertyArr, vtkEdgeType *edge)=0
Adds an edge (u, v) and returns the new edge.
abstract base class for most VTK objects
virtual void AddVertexInternal(const vtkVariant &pedigreeId, vtkIdType *vertex)=0
Add a vertex with the given pedigreeId to the distributed graph.
An array holding vtkVariants.
virtual void AttachToGraph(vtkGraph *graph)
Attach this distributed graph helper to the given graph.
virtual vtkIdType FindVertex(const vtkVariant &pedigreeId)=0
Try to find the vertex with the given pedigree ID.
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
vtkIdType GetVertexOwner(vtkIdType v) const
Returns owner of vertex v, by extracting top ceil(log2 P) bits of v.
void * VertexDistributionUserData
Extra, user-specified data to be passed into the distribution function.
vtkIdType GetVertexOwnerByPedigreeId(const vtkVariant &pedigreeId)
Determine which processor owns the vertex with the given pedigree ID.
vtkIdType highBitShiftMask
Bit mask to speed up decoding graph info {owner,index}.
vtkIdType GetVertexIndex(vtkIdType v) const
Returns local index of vertex v, by masking off top ceil(log2 P) bits of v.
int indexBits
Number of bits required to represent {vertex,edge} index.
~vtkDistributedGraphHelper() override
a simple class to control print indentation
vtkIdType GetEdgeIndex(vtkIdType e_id) const
Returns local index of edge with ID e_id, by masking off top ceil(log2 P) bits of e_id.
A atomic type representing the union of many types.
void SetVertexPedigreeIdDistribution(vtkVertexPedigreeIdDistribution Func, void *userData)
Set the pedigreeId -> processor distribution function that determines how vertices are distributed wh...
vtkIdType MakeDistributedId(int owner, vtkIdType local)
Builds a distributed ID consisting of the given owner and the local ID.
virtual void FindEdgeSourceAndTarget(vtkIdType id, vtkIdType *source, vtkIdType *target)=0
Determine the source and target of the edge with the given ID.
virtual vtkDistributedGraphHelper * Clone()=0
Clones the distributed graph helper, returning another distributed graph helper of the same kind that...
vtkIdType(* vtkVertexPedigreeIdDistribution)(const vtkVariant &pedigreeId, void *userData)
int procBits
Number of bits required to represent # of processors (owner)
virtual void AddEdgeInternal(vtkIdType u, vtkIdType v, bool directed, vtkVariantArray *propertyArr, vtkEdgeType *edge)=0
Add an edge (u, v) to the distributed graph.
Base class for graph data types.
vtkIdType GetEdgeOwner(vtkIdType e_id) const
Returns owner of edge with ID e_id, by extracting top ceil(log2 P) bits of e_id.
vtkDistributedGraphHelper()
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
vtkIdType signBitMask
Bit mask to speed up decoding graph info {owner,index}.
vtkGraph * Graph
The graph to which this distributed graph helper is already attached.
vtkVertexPedigreeIdDistribution VertexDistribution
The distribution function used to map a pedigree ID to a processor.
virtual void AddEdgeInternal(const vtkVariant &uPedigreeId, const vtkVariant &vPedigreeId, bool directed, vtkVariantArray *propertyArr, vtkEdgeType *edge)=0
Adds an edge (u, v) and returns the new edge.
static vtkInformationIntegerKey * DISTRIBUTEDEDGEIDS()