------------------------------------------------------------------------------
| 425 | |
| 426 | //------------------------------------------------------------------------------ |
| 427 | vtkIdType 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 | //------------------------------------------------------------------------------ |
| 447 | void vtkGraph::GetAdjacentVertices(vtkIdType v, vtkAdjacentVertexIterator* it) |
no test coverage detected