|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object jp.digitalmuseum.utils.SplayTree<T>
T
- Type of elements of the tree.public class SplayTree<T>
ftp://ftp.cs.cmu.edu/user/sleator/splaying/SplayTree.java}
入れ子のクラスの概要 | |
---|---|
static class |
SplayTree.BinaryNode<T>
|
コンストラクタの概要 | |
---|---|
SplayTree(java.util.Comparator<T> comparator)
|
|
SplayTree(SplayTree.BinaryNode<T> root,
java.util.Comparator<T> comparator)
|
|
SplayTree(SplayTree<T> splayTree)
|
メソッドの概要 | |
---|---|
void |
clear()
|
SplayTree<T> |
clone()
|
T |
find(T x)
Find an item in the tree. |
T |
findMax()
Find the largest item in the tree. |
T |
findMin()
Find the smallest item in the tree. |
T |
get(int index)
Find an item which has the specified index. |
boolean |
insert(T x)
Insert into the tree. |
boolean |
isEmpty()
Test if the tree is logically empty. |
boolean |
join(SplayTree<T> splayTree)
Merge two splay trees. |
static void |
main(java.lang.String[] args)
|
void |
remove(T x)
Remove from the tree. |
int |
size()
Returns size of the tree. |
SplayTree<T> |
split(int index)
Split the tree with the specified index. |
SplayTree<T> |
splitByValue(T x)
Split the tree with the specified value. |
java.lang.String |
toString()
|
クラス java.lang.Object から継承されたメソッド |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
コンストラクタの詳細 |
---|
public SplayTree(java.util.Comparator<T> comparator)
public SplayTree(SplayTree<T> splayTree)
public SplayTree(SplayTree.BinaryNode<T> root, java.util.Comparator<T> comparator)
メソッドの詳細 |
---|
public boolean insert(T x)
x
- the item to insert.
public void remove(T x)
x
- the item to remove.
ItemNotFoundException
- if x is not found.public T findMin()
public T findMax()
public T find(T x)
x
- the item to find.
public SplayTree<T> split(int index)
index
- index of the separator item.
public SplayTree<T> splitByValue(T x)
x
- the separator item.
public T get(int index)
index
- index of the item to find.
public boolean join(SplayTree<T> splayTree)
splayTree
- a splay tree to be merged.
public boolean isEmpty()
public void clear()
public int size()
public java.lang.String toString()
java.lang.Object
内の toString
public SplayTree<T> clone()
java.lang.Object
内の clone
public static void main(java.lang.String[] args)
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |