------------------------------------------------------------------------------
| 307 | |
| 308 | //------------------------------------------------------------------------------ |
| 309 | vtkIdType 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 | //------------------------------------------------------------------------------ |
| 327 | vtkIdType vtkGraph::GetDegree(vtkIdType v) |
no test coverage detected