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  */
40 #ifndef __vtkPBGLDistributedGraphHelper_h
41 #define __vtkPBGLDistributedGraphHelper_h
42 
43 #include "vtkInfovisParallelModule.h" // For export macro
45 
46 class vtkPBGLDistributedGraphHelperInternals;
47 
48 //BTX
49 namespace boost { namespace graph { namespace distributed {
50  class mpi_process_group;
51 } } }
52 //ETX
53 
54 class VTKINFOVISPARALLEL_EXPORT vtkPBGLDistributedGraphHelper : public vtkDistributedGraphHelper
55 {
56  public:
58 
61 
68  void Synchronize();
69 
72 
73  //BTX
75 
76  boost::graph::distributed::mpi_process_group GetProcessGroup();
77  //ETX
79 
82  vtkPBGLDistributedGraphHelperInternals *Internals;
83 
84  void PrintSelf(ostream& os, vtkIndent indent);
85 
86  protected:
89 
90  //BTX
91  enum Tags
92  {
93  // Find a vertex by pedigree ID. This always has a reply.
95 
96  // Find the source and target by edge ID. This always has a reply.
98 
99  // Add a vertex with the given pedigree ID.
102 
103  // Add a vertex with the given property array.
106 
107  // Add a back edge; the forward edge has already been added.
110 
111  // Add an edge; don't reply.
114 
115  // Add an edge; return the edge ID.
118 
119  // Add an edge via (pedigree, id); don't reply.
122 
123  // Add an edge via (pedigree, id); return the edge ID.
126 
127  // Add an edge via (id, pedigree); don't reply.
130 
131  // Add an edge via (pedigree, pedigree); don't reply.
133  ADD_UNDIRECTED_EDGE_NN_NO_REPLY_TAG
134 
135  };
136 
138 
143  void AddVertexInternal(vtkVariantArray *propertyArr,
144  vtkIdType *vertex);
146 
149  void AddVertexInternal(const vtkVariant& pedigreeId, vtkIdType *vertex);
150 
152 
156  void AddEdgeInternal(vtkIdType u, vtkIdType v, bool directed,
157  vtkVariantArray *propertyArr,
158  vtkEdgeType *edge);
160 
162 
168  void AddEdgeInternal(const vtkVariant& uPedigreeId, vtkIdType v,
169  bool directed, vtkVariantArray *propertyArr,
170  vtkEdgeType *edge);
172 
174 
180  void AddEdgeInternal(vtkIdType u, const vtkVariant& vPedigreeId,
181  bool directed, vtkVariantArray *propertyArr,
182  vtkEdgeType *edge);
184 
186 
193  void AddEdgeInternal(const vtkVariant& uPedigreeId,
194  const vtkVariant& vPedigreeId,
195  bool directed, vtkVariantArray *propertyArr,
196  vtkEdgeType *edge);
198 
201  vtkIdType FindVertex(const vtkVariant& pedigreeId);
202 
204 
210 
212 
214  void AttachToGraph(vtkGraph *graph);
215  //ETX
217 
218  private:
220  void operator=(const vtkPBGLDistributedGraphHelper&); // Not implemented
221 
222  //BTX
223  friend class vtkPBGLDistributedGraphHelperInternals;
224  //ETX
225 };
226 
227 #endif // __vtkPBGLDistributedGraphHelper_h
helper for the vtkGraph class that allows the graph to be distributed across multiple memory spaces...
virtual void AddEdgeInternal(vtkIdType u, vtkIdType v, bool directed, vtkVariantArray *propertyArr, vtkEdgeType *edge)=0
Forward declaration required for Boost serialization.
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
const GLdouble * v
Definition: vtkgl.h:11595
An array holding vtkVariants.
void PrintSelf(ostream &os, vtkIndent indent)
virtual vtkDistributedGraphHelper * Clone()=0
virtual void AttachToGraph(vtkGraph *graph)
virtual void Synchronize()=0
virtual vtkIdType FindVertex(const vtkVariant &pedigreeId)=0
int vtkIdType
Definition: vtkType.h:268
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:619
A atomic type representing the union of many types.
Definition: vtkVariant.h:78
Base class for graph data types.
Definition: vtkGraph.h:288
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkPBGLDistributedGraphHelperInternals * Internals
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
virtual void FindEdgeSourceAndTarget(vtkIdType id, vtkIdType *source, vtkIdType *target)=0
virtual void AddVertexInternal(vtkVariantArray *propertyArr, vtkIdType *vertex)=0
static vtkObject * New()
end namespace boost::graph::distributed