---------------------------------------------------------------------------
| 362 | |
| 363 | //--------------------------------------------------------------------------- |
| 364 | vtkIdType vtkHyperTree::GetGlobalNodeIndexMax() const |
| 365 | { |
| 366 | if (static_cast<vtkIdType>(!this->Datas->GlobalIndexTable.empty())) |
| 367 | { |
| 368 | // Case explicit global node index |
| 369 | const std::vector<vtkIdType>::iterator it_end = this->Datas->GlobalIndexTable.end(); |
| 370 | const std::vector<vtkIdType>::iterator elt_found = |
| 371 | std::max_element(this->Datas->GlobalIndexTable.begin(), it_end); |
| 372 | assert("pre: not_positive_globalindex" && |
| 373 | (*std::max_element(this->Datas->GlobalIndexTable.begin(), it_end)) >= 0); |
| 374 | return *elt_found; |
| 375 | } |
| 376 | // Case implicit global node index |
| 377 | assert("pre: not_positive_startindex" && this->Datas->GlobalIndexStart >= 0); |
| 378 | return this->Datas->GlobalIndexStart + this->Datas->NumberOfVertices - 1; |
| 379 | } |
| 380 | |
| 381 | //--------------------------------------------------------------------------- |
| 382 | // Description: |