class Node[K] extends Error
The Node
class defines a splittable node type with methods for finding
entries (keys and values).
- Alphabetic
- By Inheritance
- Node
- Error
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
Node(lt: Node[K], kd: K, rt: Node[K], half: Int)(implicit arg0: (K) ⇒ Ordered[K], arg1: ClassTag[K])
Construct a new root node with one key (and two references) in it.
Construct a new root node with one key (and two references) in it.
- lt
the left node
- kd
the divider key
- rt
the right node
-
new
Node(isLeaf: Boolean = true, half: Int = 2)(implicit arg0: (K) ⇒ Ordered[K], arg1: ClassTag[K])
- isLeaf
whether the node is a leaf (true) or internal node (false)
- half
half the maximum number of keys allowed in a ndoe
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
find(k: K): Int
Find the "<=" position of key 'k' in 'this' node.
Find the "<=" position of key 'k' in 'this' node. If 'k' is larger than all keys in 'this' node, return 'nkeys'.
- k
the key whose position is sought
-
final
def
flaw(method: String, message: String): Unit
Show the flaw by printing the error message.
Show the flaw by printing the error message.
- method
the method where the error occurred
- message
the error message
- Definition Classes
- Error
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val half: Int
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
isFull: Boolean
Determine whether 'this' mode is currently full.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val isLeaf: Boolean
-
val
key: Array[K]
The array of keys
-
val
mx: Int
The maximum number of keys
-
var
nKeys: Int
The number of active keys
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
val
ref: Array[Any]
The array of references
-
def
split(): (K, Node[K])
Split 'this' node by creating a right sibling 'rt' and moving half the keys and references to that new node.
Split 'this' node by creating a right sibling 'rt' and moving half the keys and references to that new node. Return the divider key and the right sibling node.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
Convert 'this' node to a string.
Convert 'this' node to a string.
- Definition Classes
- Node → AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
wedge(k: K, v: Any, ip: Int, left: Boolean = true): Unit
When space is available, wedge the new key 'k' and value 'v' into 'this' node at the given insertion position 'ip'.
When space is available, wedge the new key 'k' and value 'v' into 'this' node at the given insertion position 'ip'.
- k
the new key
- v
the new value
- ip
the insertion position
- left
whether to start with from the left size of the key