VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Filtering
vtkDistributedGraphHelper.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkDistributedGraphHelper.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
*/
20
55
#ifndef __vtkDistributedGraphHelper_h
56
#define __vtkDistributedGraphHelper_h
57
58
#include "
vtkObject.h
"
59
60
class
vtkDistributedGraphHelperInternals;
61
struct
vtkEdgeType
;
62
class
vtkGraph
;
63
class
vtkVariant
;
64
class
vtkVariantArray
;
65
class
vtkInformationIntegerKey
;
66
67
// .NAME vtkVertexPedigreeIdDistributionFunction - The type of a
68
// function used to determine how to distribute vertex pedigree IDs
69
// across processors in a vtkGraph. The pedigree ID distribution
70
// function takes the pedigree ID of the vertex and a user-supplied
71
// void pointer and returns a hash value V. A vertex with that
72
// pedigree ID will reside on processor V % P, where P is the number
73
// of processors. This type is used in conjunction with the
74
// vtkDistributedGraphHelper class.
75
typedef
vtkIdType
(*
vtkVertexPedigreeIdDistribution
)
76
(
const
vtkVariant
& pedigreeId,
void
* userData);
77
78
class
VTK_FILTERING_EXPORT
vtkDistributedGraphHelper
:
public
vtkObject
79
{
80
public
:
81
vtkTypeMacro(
vtkDistributedGraphHelper
,
vtkObject
);
82
void
PrintSelf
(ostream& os,
vtkIndent
indent);
83
85
vtkIdType
GetVertexOwner(
vtkIdType
v)
const
;
86
89
vtkIdType
GetVertexIndex(
vtkIdType
v)
const
;
90
93
vtkIdType
GetEdgeOwner(
vtkIdType
e_id)
const
;
94
97
vtkIdType
GetEdgeIndex(
vtkIdType
e_id)
const
;
98
101
vtkIdType
MakeDistributedId(
int
owner,
vtkIdType
local);
102
103
//BTX
105
110
void
SetVertexPedigreeIdDistribution(
vtkVertexPedigreeIdDistribution
Func,
111
void
*userData);
112
//ETX
114
116
vtkIdType
GetVertexOwnerByPedigreeId(
const
vtkVariant
& pedigreeId);
117
124
virtual
void
Synchronize() = 0;
125
128
virtual
vtkDistributedGraphHelper
*Clone() = 0;
129
131
136
static
vtkInformationIntegerKey
* DISTRIBUTEDVERTEXIDS();
137
static
vtkInformationIntegerKey
* DISTRIBUTEDEDGEIDS();
139
140
protected
:
141
vtkDistributedGraphHelper
();
142
virtual
~
vtkDistributedGraphHelper
();
143
145
150
virtual
void
AddVertexInternal(
vtkVariantArray
*propertyArr,
151
vtkIdType
*vertex) = 0;
153
156
virtual
void
AddVertexInternal(
const
vtkVariant
& pedigreeId,
vtkIdType
*vertex) = 0;
157
159
163
virtual
void
AddEdgeInternal(
vtkIdType
u,
vtkIdType
v,
bool
directed,
164
vtkVariantArray
*propertyArr,
165
vtkEdgeType
*edge) = 0;
167
169
175
virtual
void
AddEdgeInternal(
const
vtkVariant
& uPedigreeId,
vtkIdType
v,
176
bool
directed,
vtkVariantArray
*propertyArr,
177
vtkEdgeType
*edge) = 0;
179
181
187
virtual
void
AddEdgeInternal(
vtkIdType
u,
const
vtkVariant
& vPedigreeId,
188
bool
directed,
vtkVariantArray
*propertyArr,
189
vtkEdgeType
*edge) = 0;
191
193
200
virtual
void
AddEdgeInternal(
const
vtkVariant
& uPedigreeId,
201
const
vtkVariant
& vPedigreeId,
202
bool
directed,
vtkVariantArray
*propertyArr,
203
vtkEdgeType
*edge) = 0;
205
209
virtual
vtkIdType
FindVertex(
const
vtkVariant
& pedigreeId) = 0;
210
212
215
virtual
void
216
FindEdgeSourceAndTarget(
vtkIdType
id
,
217
vtkIdType
*
source
,
vtkIdType
*
target
) = 0;
219
222
virtual
void
AttachToGraph(
vtkGraph
*graph);
223
225
vtkGraph
*
Graph
;
226
227
//BTX
229
vtkVertexPedigreeIdDistribution
VertexDistribution
;
230
233
void
*
VertexDistributionUserData
;
234
236
vtkIdType
signBitMask
;
237
239
vtkIdType
highBitShiftMask
;
240
242
int
procBits
;
243
245
246
int
indexBits
;
247
//ETX
249
250
private
:
251
vtkDistributedGraphHelper
(
const
vtkDistributedGraphHelper
&);
// Not implemented
252
void
operator=(
const
vtkDistributedGraphHelper
&);
// Not implemented
253
254
//BTX
255
friend
class
vtkGraph
;
256
//ETX
257
};
258
259
#endif // __vtkDistributedGraphHelper_h
Generated on Fri Aug 2 2013 12:19:47 for VTK by
1.8.4