|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cc.mallet.util.search.SearchNode
public class SearchNode
Created by IntelliJ IDEA. User: pereira Date: Jun 20, 2005 Time: 4:46:56 PM Search tree node. A search tree node pertains to some search graph state. Multiple nodes may refer to the same state, representing different ways of reaching the state. Search nodes have a priority, which determines when they will be expanded, and cost of reaching the node from the start of the search.
Nested Class Summary | |
---|---|
class |
SearchNode.NextNodeIterator
This iterator generates search nodes that refer to the states reachable from the state pertaining to a this search node. |
Constructor Summary | |
---|---|
SearchNode(SearchState state,
SearchNode parent,
double cost)
Create a search node with given state, parent, and cost. |
Method Summary | |
---|---|
double |
getCost()
Get the cost for this node. |
SearchNode.NextNodeIterator |
getNextNodes()
Get an iterator over the new search nodes reachable from this node by state transitions. |
SearchNode |
getParent()
The node that generated this node. |
int |
getPosition()
Get the queue position of this element. |
double |
getPriority()
Get this element's priority. |
SearchState |
getState()
The state for this search node. |
boolean |
isFinal()
Is the node's state final? |
void |
setPosition(int position)
Set the current queue position for this element. |
void |
setPriority(double priority)
Set the priority of this element. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SearchNode(SearchState state, SearchNode parent, double cost)
state
- the stateparent
- the parentcost
- the costMethod Detail |
---|
public double getPriority()
QueueElement
getPriority
in interface QueueElement
public void setPriority(double priority)
QueueElement
setPriority
in interface QueueElement
priority
- the element's new prioritypublic int getPosition()
QueueElement
getPosition
in interface QueueElement
public void setPosition(int position)
QueueElement
setPosition
in interface QueueElement
position
- the new position for the elementpublic SearchNode getParent()
public double getCost()
public SearchState getState()
public boolean isFinal()
public SearchNode.NextNodeIterator getNextNodes()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |