trees :: RBTreeNode
trees $ RBTreeNode :: SELF
Type of this instance, automatically specialized in every classtrees :: BinTreeNode :: _left_node
trees :: BinTreeNode :: _next
trees :: BinTreeNode :: _prev
trees :: BinTreeNode :: _right_node
core :: Object :: class_factory
Implementation used byget_class to create the specific class.
trees :: RBTreeNode :: defaultinit
core :: Object :: defaultinit
core :: Comparable :: defaultinit
trees :: BinTreeNode :: defaultinit
trees :: TreeNode :: defaultinit
trees :: BinTreeNode :: grandparent
parent of the parent of this node (null if root)
core :: Object :: is_same_instance
Return true ifself and other are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself the same as other in a serialization context?
core :: Object :: is_same_type
Return true ifself and other have the same dynamic type.
trees :: BinTreeNode :: left
left tree node child (null if node has no left child)
trees :: BinTreeNode :: left=
setleft child for this node (or null if left no child)
trees :: BinTreeNode :: left_node
trees :: BinTreeNode :: left_node=
core :: Object :: native_class_name
The class name of the object in CString format.trees :: BinTreeNode :: next
trees :: BinTreeNode :: next=
core :: Object :: output_class_name
Display class name on stdout (debug only).trees :: BinTreeNode :: prev
trees :: BinTreeNode :: prev=
trees :: BinTreeNode :: right
right tree node child (null if node has no right child)
trees :: BinTreeNode :: right=
setright child for this node (or null if right no child)
trees :: BinTreeNode :: right_node
trees :: BinTreeNode :: right_node=
Tree implementation
# RedBlackTree node (can be red or black)
class RBTreeNode[K: Comparable, E]
super BinTreeNode[K, E]
redef type N: RBTreeNode[K, E]
# Is the node red?
private var is_red = true
redef fun to_dot do
if is_red then
return "\"{self}\"[style=filled,fillcolor=red,fontcolor=white];\n"
else
return "\"{self}\"[style=filled,fillcolor=black,fontcolor=white];\n"
end
end
end
lib/trees/rbtree.nit:129,1--146,3