public class

BellmanFord.Iterator

extends Object
implements Iterator<E>
java.lang.Object
   ↳ es.usc.citius.hipster.algorithm.BellmanFord.Iterator

Class Overview

Bellman-Ford iterator. Each invocation to next() returns the next expanded node with the approximated cost. The cost is only optimal when the queue is fully processed.

Summary

Fields
protected Map<S, N extends CostNode<A, S, C extends Comparable<C>, N>> explored
protected Queue<S> queue
Protected Constructors
BellmanFord.Iterator()
Public Methods
boolean hasNext()
N next()
void remove()
Protected Methods
N dequeue()
Removes the head of the processing queue and returns the corresponding node.
void enqueue(N node)
Assigns a node to the processing queue and adds it to the explored set of nodes.
[Expand]
Inherited Methods
From class java.lang.Object
From interface java.util.Iterator

Fields

protected Map<S, N extends CostNode<A, S, C extends Comparable<C>, N>> explored

protected Queue<S> queue

Protected Constructors

protected BellmanFord.Iterator ()

Public Methods

public boolean hasNext ()

public N next ()

public void remove ()

Protected Methods

protected N dequeue ()

Removes the head of the processing queue and returns the corresponding node.

Returns
  • node of the processing queue head

protected void enqueue (N node)

Assigns a node to the processing queue and adds it to the explored set of nodes.

Parameters
node node to update the queue status