PHP Class Medusa\Tree\PersistentRedBlackTree

Inheritance: implements IteratorAggregate, implements Medusa\Tree\RedBlackTree
Show file Open project: keyvanakbary/medusa

Public Methods

Method Description
__construct ( $key, $value, Medusa\Tree\RedBlackTree $left, Medusa\Tree\RedBlackTree $right, $color, $isRoot )
add ( $key, $value )
color ( )
contains ( $key )
createEmpty ( )
getIterator ( )
height ( )
isEmpty ( )
isRoot ( )
key ( )
left ( )
lookup ( $key )
min ( )
remove ( $key )
removeMin ( )
right ( )
search ( $key )
value ( )

Private Methods

Method Description
addLeft ( $key, $value )
addRight ( $key, $value )
balance ( Medusa\Tree\RedBlackTree $t )
compare ( $key1, $key2 )
createRed ( $key, $value, $left, $right )
flipColor ( Medusa\Tree\RedBlackTree $t )
flipColors ( Medusa\Tree\RedBlackTree $t )
flipToBlack ( Medusa\Tree\RedBlackTree $t )
flipToRed ( Medusa\Tree\RedBlackTree $t )
isRed ( Medusa\Tree\RedBlackTree $t )
minIn ( Medusa\Tree\RedBlackTree $t )
moveRedLeft ( Medusa\Tree\RedBlackTree $t )
moveRedRight ( Medusa\Tree\RedBlackTree $t )
removeIn ( Medusa\Tree\RedBlackTree $t, $key )
removeMinIn ( Medusa\Tree\RedBlackTree $t )
rotateLeft ( Medusa\Tree\RedBlackTree $t )
rotateRight ( Medusa\Tree\RedBlackTree $t )

Method Details

__construct() public method

public __construct ( $key, $value, Medusa\Tree\RedBlackTree $left, Medusa\Tree\RedBlackTree $right, $color, $isRoot )
$left Medusa\Tree\RedBlackTree
$right Medusa\Tree\RedBlackTree

add() public method

public add ( $key, $value )

color() public method

public color ( )

contains() public method

public contains ( $key )

createEmpty() public static method

public static createEmpty ( )

getIterator() public method

public getIterator ( )

height() public method

public height ( )

isEmpty() public method

public isEmpty ( )

isRoot() public method

public isRoot ( )

key() public method

public key ( )

left() public method

public left ( )

lookup() public method

public lookup ( $key )

min() public method

public min ( )

remove() public method

public remove ( $key )

removeMin() public method

public removeMin ( )

right() public method

public right ( )

value() public method

public value ( )