MCPcopy
hub / github.com/google/mangle / updateMaxEnd

Function updateMaxEnd

factstore/interval_tree.go:268–276  ·  view source on GitHub ↗

updateMaxEnd updates the maxEnd value of a node based on children.

(node *treeNode)

Source from the content-addressed store, hash-verified

266
267// updateMaxEnd updates the maxEnd value of a node based on children.
268func updateMaxEnd(node *treeNode) {
269 node.maxEnd = GetEndTime(node.interval)
270 if node.left != nil && node.left.maxEnd > node.maxEnd {
271 node.maxEnd = node.left.maxEnd
272 }
273 if node.right != nil && node.right.maxEnd > node.maxEnd {
274 node.maxEnd = node.right.maxEnd
275 }
276}
277
278// rotateRight performs a right rotation.
279func (t *IntervalTree) rotateRight(y *treeNode) *treeNode {

Callers 3

rotateRightMethod · 0.85
rotateLeftMethod · 0.85
rebalanceMethod · 0.85

Calls 1

GetEndTimeFunction · 0.85

Tested by

no test coverage detected