VTK
vtkPBGLDistributedGraphHelper.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkPBGLDistributedGraphHelper.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
15/*
16 * Copyright (C) 2008 The Trustees of Indiana University.
17 * Use, modification and distribution is subject to the Boost Software
18 * License, Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt)
19 */
42#ifndef vtkPBGLDistributedGraphHelper_h
43#define vtkPBGLDistributedGraphHelper_h
44
45#include "vtkInfovisParallelModule.h" // For export macro
47
48class vtkPBGLDistributedGraphHelperInternals;
49
50namespace boost { namespace graph { namespace distributed {
51 class mpi_process_group;
52} } }
53
54#if !defined(VTK_LEGACY_REMOVE)
55class VTKINFOVISPARALLEL_EXPORT vtkPBGLDistributedGraphHelper : public vtkDistributedGraphHelper
56{
57 public:
59
64
74
79
83 boost::graph::distributed::mpi_process_group GetProcessGroup();
84
89 vtkPBGLDistributedGraphHelperInternals *Internals;
90
91 void PrintSelf(ostream& os, vtkIndent indent);
92
93 protected:
96
97 enum Tags
98 {
99 // Find a vertex by pedigree ID. This always has a reply.
101
102 // Find the source and target by edge ID. This always has a reply.
104
105 // Add a vertex with the given pedigree ID.
108
109 // Add a vertex with the given property array.
112
113 // Add a back edge; the forward edge has already been added.
116
117 // Add an edge; don't reply.
120
121 // Add an edge; return the edge ID.
124
125 // Add an edge via (pedigree, id); don't reply.
128
129 // Add an edge via (pedigree, id); return the edge ID.
132
133 // Add an edge via (id, pedigree); don't reply.
136
137 // Add an edge via (pedigree, pedigree); don't reply.
139 ADD_UNDIRECTED_EDGE_NN_NO_REPLY_TAG
140
141 };
142
151 vtkIdType *vertex);
152
157 void AddVertexInternal(const vtkVariant& pedigreeId, vtkIdType *vertex);
158
165 void AddEdgeInternal(vtkIdType u, vtkIdType v, bool directed,
166 vtkVariantArray *propertyArr,
167 vtkEdgeType *edge);
168
177 void AddEdgeInternal(const vtkVariant& uPedigreeId, vtkIdType v,
178 bool directed, vtkVariantArray *propertyArr,
179 vtkEdgeType *edge);
180
189 void AddEdgeInternal(vtkIdType u, const vtkVariant& vPedigreeId,
190 bool directed, vtkVariantArray *propertyArr,
191 vtkEdgeType *edge);
192
202 void AddEdgeInternal(const vtkVariant& uPedigreeId,
203 const vtkVariant& vPedigreeId,
204 bool directed, vtkVariantArray *propertyArr,
205 vtkEdgeType *edge);
211 vtkIdType FindVertex(const vtkVariant& pedigreeId);
212
220
226
227 private:
229 void operator=(const vtkPBGLDistributedGraphHelper&) VTK_DELETE_FUNCTION;
230
231 friend class vtkPBGLDistributedGraphHelperInternals;
232
233};
234
235#endif //VTK_LEGACY_REMOVE
236#endif // vtkPBGLDistributedGraphHelper_h
helper for the vtkGraph class that allows the graph to be distributed across multiple memory spaces.
Base class for graph data types.
Definition: vtkGraph.h:288
a simple class to control print indentation
Definition: vtkIndent.h:40
end namespace boost::graph::distributed
vtkPBGLDistributedGraphHelperInternals * Internals
The Parallel BGL-specific internal information for this distributed graph.
boost::graph::distributed::mpi_process_group GetProcessGroup()
Return the process group associated with this distributed graph.
vtkIdType FindVertex(const vtkVariant &pedigreeId)
Try to find the vertex with the given pedigree ID.
void AddEdgeInternal(vtkIdType u, vtkIdType v, bool directed, vtkVariantArray *propertyArr, vtkEdgeType *edge)
Add an edge (u, v) to the distributed graph.
void FindEdgeSourceAndTarget(vtkIdType id, vtkIdType *source, vtkIdType *target)
Determine the source and target of the edge with the given ID.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
void AddEdgeInternal(const vtkVariant &uPedigreeId, vtkIdType v, bool directed, vtkVariantArray *propertyArr, vtkEdgeType *edge)
Adds an edge (u, v) and returns the new edge.
void AddEdgeInternal(const vtkVariant &uPedigreeId, const vtkVariant &vPedigreeId, bool directed, vtkVariantArray *propertyArr, vtkEdgeType *edge)
Adds an edge (u, v) and returns the new edge.
void AddEdgeInternal(vtkIdType u, const vtkVariant &vPedigreeId, bool directed, vtkVariantArray *propertyArr, vtkEdgeType *edge)
Adds an edge (u, v) and returns the new edge.
void AddVertexInternal(const vtkVariant &pedigreeId, vtkIdType *vertex)
Add a vertex with the given pedigree ID to the distributed graph.
void AttachToGraph(vtkGraph *graph)
Attach this distributed graph helper to the given graph.
void AddVertexInternal(vtkVariantArray *propertyArr, vtkIdType *vertex)
Add a vertex, optionally with properties, to the distributed graph.
static vtkPBGLDistributedGraphHelper * New()
Creates an empty Parallel BGL distributed graph helper.
void Synchronize()
Synchronizes all of the processors involved in this distributed graph, so that all processors have a ...
vtkDistributedGraphHelper * Clone()
Clones this distributed graph helper.
An array holding vtkVariants.
A atomic type representing the union of many types.
Definition: vtkVariant.h:76
Forward declaration required for Boost serialization.
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
int vtkIdType
Definition: vtkType.h:287