updateMaxGapLocal updates maxGap of the calling node solely with no propagation to ancestor nodes. Precondition: trackGaps must be 1.
()
| 1476 | // |
| 1477 | // Precondition: trackGaps must be 1. |
| 1478 | func (n *node) updateMaxGapLocal() { |
| 1479 | if !n.hasChildren { |
| 1480 | // Leaf node iterates its gaps. |
| 1481 | n.maxGap.Set(n.calculateMaxGapLeaf()) |
| 1482 | } else { |
| 1483 | // Non-leaf node iterates its children. |
| 1484 | n.maxGap.Set(n.calculateMaxGapInternal()) |
| 1485 | } |
| 1486 | } |
| 1487 | |
| 1488 | // calculateMaxGapLeaf iterates the gaps within a leaf node and calculate the |
| 1489 | // max. |
no test coverage detected