------------------------------------------------------------------------------
| 325 | |
| 326 | //------------------------------------------------------------------------------ |
| 327 | vtkIdType vtkGraph::GetDegree(vtkIdType v) |
| 328 | { |
| 329 | vtkIdType index = v; |
| 330 | |
| 331 | if (vtkDistributedGraphHelper* helper = this->GetDistributedGraphHelper()) |
| 332 | { |
| 333 | int myRank = this->Information->Get(vtkDataObject::DATA_PIECE_NUMBER()); |
| 334 | if (myRank != helper->GetVertexOwner(v)) |
| 335 | { |
| 336 | vtkErrorMacro("vtkGraph cannot determine the degree for a non-local vertex"); |
| 337 | return 0; |
| 338 | } |
| 339 | |
| 340 | index = helper->GetVertexIndex(v); |
| 341 | } |
| 342 | |
| 343 | return static_cast<vtkIdType>(this->Internals->Adjacency[index].InEdges.size() + |
| 344 | this->Internals->Adjacency[index].OutEdges.size()); |
| 345 | } |
| 346 | |
| 347 | //------------------------------------------------------------------------------ |
| 348 | void vtkGraph::GetInEdges(vtkIdType v, vtkInEdgeIterator* it) |
no test coverage detected