------------------------------------------------------------------------------
| 365 | |
| 366 | //------------------------------------------------------------------------------ |
| 367 | vtkInEdgeType vtkGraph::GetInEdge(vtkIdType v, vtkIdType i) |
| 368 | { |
| 369 | vtkIdType index = v; |
| 370 | if (vtkDistributedGraphHelper* helper = this->GetDistributedGraphHelper()) |
| 371 | { |
| 372 | int myRank = this->Information->Get(vtkDataObject::DATA_PIECE_NUMBER()); |
| 373 | if (myRank != helper->GetVertexOwner(v)) |
| 374 | { |
| 375 | vtkErrorMacro("vtkGraph cannot retrieve the in edges for a non-local vertex"); |
| 376 | return vtkInEdgeType(); |
| 377 | } |
| 378 | index = helper->GetVertexIndex(v); |
| 379 | } |
| 380 | |
| 381 | if (i < this->GetInDegree(v)) |
| 382 | { |
| 383 | return this->Internals->Adjacency[index].InEdges[i]; |
| 384 | } |
| 385 | vtkErrorMacro("In edge index out of bounds"); |
| 386 | return vtkInEdgeType(); |
| 387 | } |
| 388 | |
| 389 | //------------------------------------------------------------------------------ |
| 390 | void vtkGraph::GetInEdge(vtkIdType v, vtkIdType i, vtkGraphEdge* e) |