------------------------------------------------------------------------------
| 248 | |
| 249 | //------------------------------------------------------------------------------ |
| 250 | vtkOutEdgeType vtkGraph::GetOutEdge(vtkIdType v, vtkIdType i) |
| 251 | { |
| 252 | vtkIdType index = v; |
| 253 | if (vtkDistributedGraphHelper* helper = this->GetDistributedGraphHelper()) |
| 254 | { |
| 255 | int myRank = this->Information->Get(vtkDataObject::DATA_PIECE_NUMBER()); |
| 256 | if (myRank != helper->GetVertexOwner(v)) |
| 257 | { |
| 258 | vtkErrorMacro("vtkGraph cannot retrieve the out edges for non-local vertex " << v); |
| 259 | return vtkOutEdgeType(); |
| 260 | } |
| 261 | index = helper->GetVertexIndex(v); |
| 262 | } |
| 263 | |
| 264 | if (i < this->GetOutDegree(v)) |
| 265 | { |
| 266 | return this->Internals->Adjacency[index].OutEdges[i]; |
| 267 | } |
| 268 | vtkErrorMacro("Out edge index out of bounds"); |
| 269 | return vtkOutEdgeType(); |
| 270 | } |
| 271 | |
| 272 | //------------------------------------------------------------------------------ |
| 273 | void vtkGraph::GetOutEdge(vtkIdType v, vtkIdType i, vtkGraphEdge* e) |