|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.graph.traverse.AbstractBaseGraphIterator<T,N>
T - the iterator typeN - the node typepublic abstract class AbstractBaseGraphIterator<T extends AbstractBaseGraphIterator<T,N>,N>
base implementation for graph iterators.
| Nested Class Summary | |
|---|---|
protected static interface |
AbstractBaseGraphIterator.NodeQueue<A>
Interface representing a node queue. |
| Constructor Summary | |
|---|---|
AbstractBaseGraphIterator(AbstractBaseGraphIterator.NodeQueue<N> queue,
Graph<N,?> graph,
N start)
Creates a new graph iterator. |
|
| Method Summary | |
|---|---|
double |
getCost()
|
double |
getCost(N node)
Returns the cost of the given node. |
N |
getPredecessor()
Returns the predecessor node of this graph iterator. |
N |
getPredecessor(N node)
Returns the predecessor node of a certain node of this graph iterator. |
boolean |
hasNext()
|
N |
next()
|
void |
remove()
|
protected T |
self()
|
T |
setCost(CostFunction<N,?> cost)
Sets the cost function used for node expansions. |
T |
setEdgeFilter(GraphElementFilter<Edge<N>> filter)
Sets an edge filter for this node iterator. |
T |
setNodeFilter(GraphElementFilter<N> filter)
Sets a node filter for this node iterator. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractBaseGraphIterator(AbstractBaseGraphIterator.NodeQueue<N> queue,
Graph<N,?> graph,
N start)
queue - the implementation of the node queue.graph - the graphstart - the start node| Method Detail |
|---|
public final T setCost(CostFunction<N,?> cost)
GraphIterator
setCost in interface GraphIterator<T extends AbstractBaseGraphIterator<T,N>,N>cost - the cost function
public final T setNodeFilter(GraphElementFilter<N> filter)
GraphIterator
setNodeFilter in interface GraphIterator<T extends AbstractBaseGraphIterator<T,N>,N>filter - the node filter
public final T setEdgeFilter(GraphElementFilter<Edge<N>> filter)
GraphIterator
setEdgeFilter in interface GraphIterator<T extends AbstractBaseGraphIterator<T,N>,N>filter - the edge filter
public final boolean hasNext()
hasNext in interface Iterator<N>public final N next()
next in interface Iterator<N>public final N getPredecessor()
GraphIterator
getPredecessor in interface GraphIterator<T extends AbstractBaseGraphIterator<T,N>,N>public final N getPredecessor(N node)
GraphIterator
getPredecessor in interface GraphIterator<T extends AbstractBaseGraphIterator<T,N>,N>node - the node to get predecessor for
public final double getCost()
getCost in interface GraphIterator<T extends AbstractBaseGraphIterator<T,N>,N>public final double getCost(N node)
GraphIterator
getCost in interface GraphIterator<T extends AbstractBaseGraphIterator<T,N>,N>node - the node
public final void remove()
remove in interface Iterator<N>protected final T self()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||