MCPcopy Index your code
hub / github.com/google/mangle / rotateRight

Method rotateRight

factstore/interval_tree.go:279–292  ·  view source on GitHub ↗

rotateRight performs a right rotation.

(y *treeNode)

Source from the content-addressed store, hash-verified

277
278// rotateRight performs a right rotation.
279func (t *IntervalTree) rotateRight(y *treeNode) *treeNode {
280 x := y.left
281 z := x.right
282
283 x.right = y
284 y.left = z
285
286 updateHeight(y)
287 updateMaxEnd(y)
288 updateHeight(x)
289 updateMaxEnd(x)
290
291 return x
292}
293
294// rotateLeft performs a left rotation.
295func (t *IntervalTree) rotateLeft(x *treeNode) *treeNode {

Callers 1

rebalanceMethod · 0.95

Calls 2

updateHeightFunction · 0.85
updateMaxEndFunction · 0.85

Tested by

no test coverage detected