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

Method GetInDegree

Common/DataModel/vtkGraph.cxx:427–444  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

425
426//------------------------------------------------------------------------------
427vtkIdType vtkGraph::GetInDegree(vtkIdType v)
428{
429 vtkIdType index = v;
430
431 if (vtkDistributedGraphHelper* helper = this->GetDistributedGraphHelper())
432 {
433 int myRank = this->Information->Get(vtkDataObject::DATA_PIECE_NUMBER());
434 if (myRank != helper->GetVertexOwner(v))
435 {
436 vtkErrorMacro("vtkGraph cannot determine the in degree for a non-local vertex");
437 return 0;
438 }
439
440 index = helper->GetVertexIndex(v);
441 }
442
443 return static_cast<vtkIdType>(this->Internals->Adjacency[index].InEdges.size());
444}
445
446//------------------------------------------------------------------------------
447void vtkGraph::GetAdjacentVertices(vtkIdType v, vtkAdjacentVertexIterator* it)

Callers 7

GetInEdgeMethod · 0.95
IsStructureValidMethod · 0.45
in_degreeFunction · 0.45
UpdatePositionsMethod · 0.45
UniversalStartPointsMethod · 0.45
SpiralPerturbationMethod · 0.45
LayoutMethod · 0.45

Calls 5

GetVertexOwnerMethod · 0.80
GetMethod · 0.45
GetVertexIndexMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected