com.kuka.graph.traverse
Interface GraphIterator<T extends GraphIterator<T,N>,N>

Type Parameters:
T - the iterator type
N - the node type
All Superinterfaces:
Iterator<N>
All Known Implementing Classes:
AbstractBaseGraphIterator, BreadthFirstIterator, ClosestFirstIterator, DepthFirstIterator

public interface GraphIterator<T extends GraphIterator<T,N>,N>
extends Iterator<N>

Iterator interface for graph traversal.


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.
 T setCost(CostFunction<N,?> costFunction)
          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 interface java.util.Iterator
hasNext, next, remove
 

Method Detail

setNodeFilter

T setNodeFilter(GraphElementFilter<N> filter)
Sets a node filter for this node iterator.

Parameters:
filter - the node filter
Returns:
this iterator

setEdgeFilter

T setEdgeFilter(GraphElementFilter<Edge<N>> filter)
Sets an edge filter for this node iterator.

Parameters:
filter - the edge filter
Returns:
this iterator

setCost

T setCost(CostFunction<N,?> costFunction)
Sets the cost function used for node expansions.

Parameters:
costFunction - the cost function
Returns:
this iterator

getPredecessor

N getPredecessor()
Returns the predecessor node of this graph iterator.

Returns:
the predecessor node

getPredecessor

N getPredecessor(N node)
Returns the predecessor node of a certain node of this graph iterator.

Parameters:
node - the node to get predecessor for
Returns:
the predecessor node

getCost

double getCost()
Returns:
the cost of the current node.

getCost

double getCost(N node)
Returns the cost of the given node.

Parameters:
node - the node
Returns:
the cost


Copyright © 2019. All rights reserved.