UNPKG

sonic-forest

Version:

High-performance (binary) tree and sorted map implementation (AVL, Splay, Radix, Red-Black)

21 lines (20 loc) 623 B
import type { IRbTreeNode } from '../red-black/types'; export declare class TreeNode<K, V> implements IRbTreeNode<K, V> { k: K; v: V; b: boolean; l: TreeNode<K, V> | undefined; r: TreeNode<K, V> | undefined; p: TreeNode<K, V> | undefined; constructor(k: K, v: V, b?: boolean); prev(): TreeNode<K, V>; next(): TreeNode<K, V>; rRotate(): TreeNode<K, V>; lRotate(): TreeNode<K, V>; } export declare class TreeNodeEnableIndex<K, V> extends TreeNode<K, V> { _size: number; rRotate(): TreeNodeEnableIndex<K, V>; lRotate(): TreeNodeEnableIndex<K, V>; compute(): void; }