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  */
41 #ifndef vtkPBGLDistributedGraphHelper_h
42 #define vtkPBGLDistributedGraphHelper_h
43 
44 #include "vtkInfovisParallelModule.h" // For export macro
46 
47 class vtkPBGLDistributedGraphHelperInternals;
48 
49 //BTX
50 namespace boost { namespace graph { namespace distributed {
51  class mpi_process_group;
52 } } }
53 //ETX
54 
55 #if !defined(VTK_LEGACY_REMOVE)
56 class VTKINFOVISPARALLEL_EXPORT vtkPBGLDistributedGraphHelper : public vtkDistributedGraphHelper
57 {
58  public:
60 
63 
70  void Synchronize();
71 
74 
75  //BTX
77 
78  boost::graph::distributed::mpi_process_group GetProcessGroup();
79  //ETX
81 
84  vtkPBGLDistributedGraphHelperInternals *Internals;
85 
86  void PrintSelf(ostream& os, vtkIndent indent);
87 
88  protected:
91 
92  //BTX
93  enum Tags
94  {
95  // Find a vertex by pedigree ID. This always has a reply.
97 
98  // Find the source and target by edge ID. This always has a reply.
100 
101  // Add a vertex with the given pedigree ID.
104 
105  // Add a vertex with the given property array.
108 
109  // Add a back edge; the forward edge has already been added.
112 
113  // Add an edge; don't reply.
116 
117  // Add an edge; return the edge ID.
120 
121  // Add an edge via (pedigree, id); don't reply.
124 
125  // Add an edge via (pedigree, id); return the edge ID.
128 
129  // Add an edge via (id, pedigree); don't reply.
132 
133  // Add an edge via (pedigree, pedigree); don't reply.
135  ADD_UNDIRECTED_EDGE_NN_NO_REPLY_TAG
136 
137  };
138 
140 
146  vtkIdType *vertex);
148 
151  void AddVertexInternal(const vtkVariant& pedigreeId, vtkIdType *vertex);
152 
154 
158  void AddEdgeInternal(vtkIdType u, vtkIdType v, bool directed,
159  vtkVariantArray *propertyArr,
160  vtkEdgeType *edge);
162 
164 
170  void AddEdgeInternal(const vtkVariant& uPedigreeId, vtkIdType v,
171  bool directed, vtkVariantArray *propertyArr,
172  vtkEdgeType *edge);
174 
176 
182  void AddEdgeInternal(vtkIdType u, const vtkVariant& vPedigreeId,
183  bool directed, vtkVariantArray *propertyArr,
184  vtkEdgeType *edge);
186 
188 
195  void AddEdgeInternal(const vtkVariant& uPedigreeId,
196  const vtkVariant& vPedigreeId,
197  bool directed, vtkVariantArray *propertyArr,
198  vtkEdgeType *edge);
200 
203  vtkIdType FindVertex(const vtkVariant& pedigreeId);
204 
206 
212 
214 
216  void AttachToGraph(vtkGraph *graph);
217  //ETX
219 
220  private:
222  void operator=(const vtkPBGLDistributedGraphHelper&); // Not implemented
223 
224  //BTX
225  friend class vtkPBGLDistributedGraphHelperInternals;
226  //ETX
227 };
228 
229 #endif //VTK_LEGACY_REMOVE
230 #endif // vtkPBGLDistributedGraphHelper_h
vtkPBGLDistributedGraphHelper::AddEdgeInternal
void AddEdgeInternal(const vtkVariant &uPedigreeId, vtkIdType v, bool directed, vtkVariantArray *propertyArr, vtkEdgeType *edge)
vtkPBGLDistributedGraphHelper::ADD_DIRECTED_EDGE_WITH_REPLY_TAG
@ ADD_DIRECTED_EDGE_WITH_REPLY_TAG
Definition: vtkPBGLDistributedGraphHelper.h:118
vtkPBGLDistributedGraphHelper::ADD_VERTEX_PROPS_WITH_REPLY_TAG
@ ADD_VERTEX_PROPS_WITH_REPLY_TAG
Definition: vtkPBGLDistributedGraphHelper.h:107
vtkPBGLDistributedGraphHelper::ADD_DIRECTED_EDGE_IN_NO_REPLY_TAG
@ ADD_DIRECTED_EDGE_IN_NO_REPLY_TAG
Definition: vtkPBGLDistributedGraphHelper.h:130
vtkPBGLDistributedGraphHelper::ADD_DIRECTED_EDGE_NO_REPLY_TAG
@ ADD_DIRECTED_EDGE_NO_REPLY_TAG
Definition: vtkPBGLDistributedGraphHelper.h:114
vtkPBGLDistributedGraphHelper
end namespace boost::graph::distributed
Definition: vtkPBGLDistributedGraphHelper.h:57
vtkPBGLDistributedGraphHelper::ADD_UNDIRECTED_BACK_EDGE_TAG
@ ADD_UNDIRECTED_BACK_EDGE_TAG
Definition: vtkPBGLDistributedGraphHelper.h:111
vtkDistributedGraphHelper
helper for the vtkGraph class that allows the graph to be distributed across multiple memory spaces.
Definition: vtkDistributedGraphHelper.h:80
vtkPBGLDistributedGraphHelper::AddEdgeInternal
void AddEdgeInternal(vtkIdType u, const vtkVariant &vPedigreeId, bool directed, vtkVariantArray *propertyArr, vtkEdgeType *edge)
vtkPBGLDistributedGraphHelper::GetProcessGroup
boost::graph::distributed::mpi_process_group GetProcessGroup()
vtkPBGLDistributedGraphHelper::~vtkPBGLDistributedGraphHelper
~vtkPBGLDistributedGraphHelper()
vtkIdType
int vtkIdType
Definition: vtkType.h:275
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkPBGLDistributedGraphHelper::AddEdgeInternal
void AddEdgeInternal(const vtkVariant &uPedigreeId, const vtkVariant &vPedigreeId, bool directed, vtkVariantArray *propertyArr, vtkEdgeType *edge)
vtkgl::v
const GLdouble * v
Definition: vtkgl.h:11595
vtkPBGLDistributedGraphHelper::FindEdgeSourceAndTarget
void FindEdgeSourceAndTarget(vtkIdType id, vtkIdType *source, vtkIdType *target)
boost
Forward declaration required for Boost serialization.
Definition: vtkVariantArray.h:44
vtkVariantArray
An array holding vtkVariants.
Definition: vtkVariantArray.h:48
vtkPBGLDistributedGraphHelper::Synchronize
void Synchronize()
vtkPBGLDistributedGraphHelper::New
static vtkPBGLDistributedGraphHelper * New()
source
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:821
vtkPBGLDistributedGraphHelper::AddVertexInternal
void AddVertexInternal(vtkVariantArray *propertyArr, vtkIdType *vertex)
vtkEdgeType
Definition: vtkGraph.h:277
vtkPBGLDistributedGraphHelper::ADD_DIRECTED_BACK_EDGE_TAG
@ ADD_DIRECTED_BACK_EDGE_TAG
Definition: vtkPBGLDistributedGraphHelper.h:110
vtkPBGLDistributedGraphHelper::AddVertexInternal
void AddVertexInternal(const vtkVariant &pedigreeId, vtkIdType *vertex)
vtkPBGLDistributedGraphHelper::ADD_UNDIRECTED_EDGE_NO_REPLY_TAG
@ ADD_UNDIRECTED_EDGE_NO_REPLY_TAG
Definition: vtkPBGLDistributedGraphHelper.h:115
vtkPBGLDistributedGraphHelper::FIND_EDGE_SOURCE_TARGET_TAG
@ FIND_EDGE_SOURCE_TARGET_TAG
Definition: vtkPBGLDistributedGraphHelper.h:99
vtkPBGLDistributedGraphHelper::Internals
vtkPBGLDistributedGraphHelperInternals * Internals
Definition: vtkPBGLDistributedGraphHelper.h:84
vtkPBGLDistributedGraphHelper::ADD_UNDIRECTED_EDGE_WITH_REPLY_TAG
@ ADD_UNDIRECTED_EDGE_WITH_REPLY_TAG
Definition: vtkPBGLDistributedGraphHelper.h:119
vtkPBGLDistributedGraphHelper::ADD_DIRECTED_EDGE_NN_NO_REPLY_TAG
@ ADD_DIRECTED_EDGE_NN_NO_REPLY_TAG
Definition: vtkPBGLDistributedGraphHelper.h:134
vtkDistributedGraphHelper.h
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkPBGLDistributedGraphHelper::ADD_VERTEX_PROPS_NO_REPLY_TAG
@ ADD_VERTEX_PROPS_NO_REPLY_TAG
Definition: vtkPBGLDistributedGraphHelper.h:106
vtkVariant
A atomic type representing the union of many types.
Definition: vtkVariant.h:79
vtkPBGLDistributedGraphHelper::AttachToGraph
void AttachToGraph(vtkGraph *graph)
vtkPBGLDistributedGraphHelper::Clone
vtkDistributedGraphHelper * Clone()
vtkPBGLDistributedGraphHelper::ADD_VERTEX_NO_REPLY_TAG
@ ADD_VERTEX_NO_REPLY_TAG
Definition: vtkPBGLDistributedGraphHelper.h:102
vtkPBGLDistributedGraphHelper::ADD_UNDIRECTED_EDGE_NI_WITH_REPLY_TAG
@ ADD_UNDIRECTED_EDGE_NI_WITH_REPLY_TAG
Definition: vtkPBGLDistributedGraphHelper.h:127
vtkPBGLDistributedGraphHelper::ADD_VERTEX_WITH_REPLY_TAG
@ ADD_VERTEX_WITH_REPLY_TAG
Definition: vtkPBGLDistributedGraphHelper.h:103
vtkPBGLDistributedGraphHelper::AddEdgeInternal
void AddEdgeInternal(vtkIdType u, vtkIdType v, bool directed, vtkVariantArray *propertyArr, vtkEdgeType *edge)
vtkPBGLDistributedGraphHelper::Tags
Tags
Definition: vtkPBGLDistributedGraphHelper.h:94
vtkPBGLDistributedGraphHelper::FIND_VERTEX_TAG
@ FIND_VERTEX_TAG
Definition: vtkPBGLDistributedGraphHelper.h:96
vtkPBGLDistributedGraphHelper::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkPBGLDistributedGraphHelper::ADD_UNDIRECTED_EDGE_NI_NO_REPLY_TAG
@ ADD_UNDIRECTED_EDGE_NI_NO_REPLY_TAG
Definition: vtkPBGLDistributedGraphHelper.h:123
vtkGraph
Base class for graph data types.
Definition: vtkGraph.h:289
vtkPBGLDistributedGraphHelper::vtkPBGLDistributedGraphHelper
vtkPBGLDistributedGraphHelper()
vtkPBGLDistributedGraphHelper::ADD_UNDIRECTED_EDGE_IN_NO_REPLY_TAG
@ ADD_UNDIRECTED_EDGE_IN_NO_REPLY_TAG
Definition: vtkPBGLDistributedGraphHelper.h:131
target
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:828
vtkPBGLDistributedGraphHelper::FindVertex
vtkIdType FindVertex(const vtkVariant &pedigreeId)
vtkPBGLDistributedGraphHelper::ADD_DIRECTED_EDGE_NI_NO_REPLY_TAG
@ ADD_DIRECTED_EDGE_NI_NO_REPLY_TAG
Definition: vtkPBGLDistributedGraphHelper.h:122
vtkPBGLDistributedGraphHelper::ADD_DIRECTED_EDGE_NI_WITH_REPLY_TAG
@ ADD_DIRECTED_EDGE_NI_WITH_REPLY_TAG
Definition: vtkPBGLDistributedGraphHelper.h:126