MCPcopy Create free account
hub / github.com/Kitware/VTK / GetGlobalNodeIndexMax

Method GetGlobalNodeIndexMax

Common/DataModel/vtkHyperTree.cxx:364–379  ·  view source on GitHub ↗

---------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

362
363//---------------------------------------------------------------------------
364vtkIdType 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:

Callers 2

TripFunction · 0.45
ProcessTreesMethod · 0.45

Calls 4

assertFunction · 0.50
emptyMethod · 0.45
endMethod · 0.45
beginMethod · 0.45

Tested by 1

TripFunction · 0.36