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

Method ShouldMask

Filters/Sources/vtkRandomHyperTreeGridSource.cxx:398–405  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

396
397//------------------------------------------------------------------------------
398bool vtkRandomHyperTreeGridSource::ShouldMask(
399 double siblingsFractionMasked, int level, double errorMargin)
400{
401 int levelWeight = std::max(1, static_cast<int>(level * this->MaxDepth));
402 // We penalize the masking of high depth node since they are harder to attain.
403 // This allows to have more deep nodes unmasked.
404 return siblingsFractionMasked * levelWeight <= this->MaskedFraction - errorMargin;
405}
406
407//------------------------------------------------------------------------------
408void vtkRandomHyperTreeGridSource::InitializeMaskingNodeCostPerLevel()

Callers 1

GenerateMaskMethod · 0.95

Calls 1

maxFunction · 0.50

Tested by

no test coverage detected