------------------------------------------------------------------------------
| 514 | |
| 515 | //------------------------------------------------------------------------------ |
| 516 | vtkIdType vtkGraph::FindVertex(const vtkVariant& pedigreeId) |
| 517 | { |
| 518 | vtkAbstractArray* pedigrees = this->GetVertexData()->GetPedigreeIds(); |
| 519 | if (pedigrees == nullptr) |
| 520 | { |
| 521 | return -1; |
| 522 | } |
| 523 | |
| 524 | if (vtkDistributedGraphHelper* helper = this->GetDistributedGraphHelper()) |
| 525 | { |
| 526 | vtkIdType myRank = this->Information->Get(vtkDataObject::DATA_PIECE_NUMBER()); |
| 527 | if (helper->GetVertexOwnerByPedigreeId(pedigreeId) != myRank) |
| 528 | { |
| 529 | // The vertex is remote; ask the distributed graph helper to find it. |
| 530 | return helper->FindVertex(pedigreeId); |
| 531 | } |
| 532 | |
| 533 | vtkIdType result = pedigrees->LookupValue(pedigreeId); |
| 534 | if (result == -1) |
| 535 | { |
| 536 | return -1; |
| 537 | } |
| 538 | return helper->MakeDistributedId(myRank, result); |
| 539 | } |
| 540 | |
| 541 | return pedigrees->LookupValue(pedigreeId); |
| 542 | } |
| 543 | |
| 544 | //------------------------------------------------------------------------------ |
| 545 | bool vtkGraph::CheckedShallowCopy(vtkGraph* g) |
no test coverage detected