MCPcopy Create free account
hub / github.com/Kitware/VTK / GetOutEdge

Method GetOutEdge

Common/DataModel/vtkGraph.cxx:250–270  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

248
249//------------------------------------------------------------------------------
250vtkOutEdgeType vtkGraph::GetOutEdge(vtkIdType v, vtkIdType i)
251{
252 vtkIdType index = v;
253 if (vtkDistributedGraphHelper* helper = this->GetDistributedGraphHelper())
254 {
255 int myRank = this->Information->Get(vtkDataObject::DATA_PIECE_NUMBER());
256 if (myRank != helper->GetVertexOwner(v))
257 {
258 vtkErrorMacro("vtkGraph cannot retrieve the out edges for non-local vertex " << v);
259 return vtkOutEdgeType();
260 }
261 index = helper->GetVertexIndex(v);
262 }
263
264 if (i < this->GetOutDegree(v))
265 {
266 return this->Internals->Adjacency[index].OutEdges[i];
267 }
268 vtkErrorMacro("Out edge index out of bounds");
269 return vtkOutEdgeType();
270}
271
272//------------------------------------------------------------------------------
273void vtkGraph::GetOutEdge(vtkIdType v, vtkIdType i, vtkGraphEdge* e)

Callers 3

GetInEdgeMethod · 0.80
TestGraphIteratorsFunction · 0.80
SpiralPerturbationMethod · 0.80

Calls 9

GetOutDegreeMethod · 0.95
GetVertexOwnerMethod · 0.80
vtkOutEdgeTypeClass · 0.70
GetMethod · 0.45
GetVertexIndexMethod · 0.45
SetIdMethod · 0.45
SetSourceMethod · 0.45
SetTargetMethod · 0.45

Tested by 1

TestGraphIteratorsFunction · 0.64