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

Method GetOutDegree

Common/DataModel/vtkGraph.cxx:309–324  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

307
308//------------------------------------------------------------------------------
309vtkIdType vtkGraph::GetOutDegree(vtkIdType v)
310{
311 vtkIdType index = v;
312 if (vtkDistributedGraphHelper* helper = this->GetDistributedGraphHelper())
313 {
314 int myRank = this->Information->Get(vtkDataObject::DATA_PIECE_NUMBER());
315 if (myRank != helper->GetVertexOwner(v))
316 {
317 vtkErrorMacro("vtkGraph cannot determine the out degree for a non-local vertex");
318 return 0;
319 }
320
321 index = helper->GetVertexIndex(v);
322 }
323 return static_cast<vtkIdType>(this->Internals->Adjacency[index].OutEdges.size());
324}
325
326//------------------------------------------------------------------------------
327vtkIdType vtkGraph::GetDegree(vtkIdType v)

Callers 12

GetOutEdgeMethod · 0.95
GetInDegreeMethod · 0.80
SetGraphMethod · 0.80
IncrementMethod · 0.80
GetNumberOfChildrenFunction · 0.80
vtk_edge_iteratorMethod · 0.80
incMethod · 0.80
out_degreeFunction · 0.80
UpdatePositionsMethod · 0.80
UniversalStartPointsMethod · 0.80
SpiralPerturbationMethod · 0.80
LocalPlacementMethod · 0.80

Calls 5

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

Tested by

no test coverage detected