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

Method ComputeBreadthFirstOrderDescriptorImpl

Common/DataModel/vtkHyperTree.cxx:480–503  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

478
479//---------------------------------------------------------------------------
480void vtkHyperTree::ComputeBreadthFirstOrderDescriptorImpl(const unsigned int depthLimiter,
481 vtkBitArray* inputMask, const unsigned int depth, vtkIdType index,
482 std::vector<std::vector<bool>>& descriptorPerDepth,
483 std::vector<std::vector<vtkIdType>>& breadthFirstOrderIdMapPerDepth)
484{
485 vtkIdType idg = this->GetGlobalIndexFromLocal(index);
486 bool mask = inputMask ? inputMask->GetValue(idg) : false;
487 breadthFirstOrderIdMapPerDepth[depth].emplace_back(idg);
488 assert("pre: depth valid" && depth < std::numeric_limits<unsigned int>::max());
489 if (!this->IsLeaf(index) && !mask && depth < depthLimiter)
490 {
491 descriptorPerDepth[depth].push_back(true);
492 for (int iChild = 0; iChild < this->NumberOfChildren; ++iChild)
493 {
494 this->ComputeBreadthFirstOrderDescriptorImpl(depthLimiter, inputMask, depth + 1,
495 this->GetElderChildIndex(index) + iChild, descriptorPerDepth,
496 breadthFirstOrderIdMapPerDepth);
497 }
498 }
499 else
500 {
501 descriptorPerDepth[depth].push_back(false);
502 }
503}
504
505// VTK_DEPRECATED_IN_9_6_0
506vtkHyperTree* vtkHyperTree::CreateInstance(unsigned char factor, unsigned char dimension)

Callers 1

Calls 8

IsLeafMethod · 0.95
GetElderChildIndexMethod · 0.95
assertFunction · 0.50
maxFunction · 0.50
GetValueMethod · 0.45
emplace_backMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected