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

Method GetInEdge

Common/DataModel/vtkGraph.cxx:367–387  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

365
366//------------------------------------------------------------------------------
367vtkInEdgeType vtkGraph::GetInEdge(vtkIdType v, vtkIdType i)
368{
369 vtkIdType index = v;
370 if (vtkDistributedGraphHelper* helper = this->GetDistributedGraphHelper())
371 {
372 int myRank = this->Information->Get(vtkDataObject::DATA_PIECE_NUMBER());
373 if (myRank != helper->GetVertexOwner(v))
374 {
375 vtkErrorMacro("vtkGraph cannot retrieve the in edges for a non-local vertex");
376 return vtkInEdgeType();
377 }
378 index = helper->GetVertexIndex(v);
379 }
380
381 if (i < this->GetInDegree(v))
382 {
383 return this->Internals->Adjacency[index].InEdges[i];
384 }
385 vtkErrorMacro("In edge index out of bounds");
386 return vtkInEdgeType();
387}
388
389//------------------------------------------------------------------------------
390void vtkGraph::GetInEdge(vtkIdType v, vtkIdType i, vtkGraphEdge* e)

Callers 3

TestGraphIteratorsFunction · 0.45
SpiralPerturbationMethod · 0.45

Calls 9

GetInDegreeMethod · 0.95
vtkInEdgeTypeClass · 0.85
GetVertexOwnerMethod · 0.80
GetMethod · 0.45
GetVertexIndexMethod · 0.45
SetIdMethod · 0.45
SetSourceMethod · 0.45
SetTargetMethod · 0.45

Tested by 1

TestGraphIteratorsFunction · 0.36