public class AbstractSearchTree<T extends AbstractSearchTreeNode> extends Object
Constructor and Description |
---|
AbstractSearchTree(Heuristic<T> heuristic)
create a new search tree
|
Modifier and Type | Method and Description |
---|---|
void |
addNode(T parentNode,
T node)
add node to the search tree
|
T |
best() |
Iterator<T> |
descendingIterator() |
SortedSet<T> |
descendingSet() |
Heuristic<T> |
getHeuristic() |
Set<T> |
getNodeSet() |
T |
getRoot() |
void |
notifyNode(T node)
internally used by tree<->node contract to notify a tree about an added node
|
void |
setRoot(T node)
set the tree root to a node
|
int |
size() |
void |
updateDone(T node)
must be called after modifying a node, to support immutable set element pattern
|
void |
updatePrepare(T node)
must be called before modifying a node, to support immutable set element pattern
|
public AbstractSearchTree(Heuristic<T> heuristic)
heuristic
- the comparator to use for the nodespublic void addNode(T parentNode, T node)
parentNode
- the parent node or null if rootnode
- the node to addpublic final void notifyNode(T node)
node
- the nodepublic final void updatePrepare(T node)
node
- the nodepublic final void updateDone(T node)
public Iterator<T> descendingIterator()
public SortedSet<T> descendingSet()
public Set<T> getNodeSet()
public int size()
public Heuristic<T> getHeuristic()
DL-Learner is licenced under the terms of the GNU General Public License.
Copyright © 2007-2019 Jens Lehmann