org.neo4j.graphalgo.impl.shortestpath
Interface DijkstraPriorityQueue<CostType>

Type Parameters:
CostType - The datatype the path weigths are represented by.
All Known Implementing Classes:
DijkstraPriorityQueueFibonacciImpl, DijkstraPriorityQueueImpl

public interface DijkstraPriorityQueue<CostType>

Abstraction of the priority queue used by Dijkstra in order to make (testing of) alternative implementations easier.


Method Summary
 void decreaseValue(Node node, CostType newValue)
          Used to update a value in the queue (or insert it).
 Node extractMin()
          Retrieve and remove the node with the most optimal value.
 void insertValue(Node node, CostType value)
          Used to insert a new value into the queue.
 boolean isEmpty()
           
 Node peek()
          Retrieve without removing the node with the most optimal value.
 

Method Detail

insertValue

void insertValue(Node node,
                 CostType value)
Used to insert a new value into the queue.

Parameters:
node -
value -

decreaseValue

void decreaseValue(Node node,
                   CostType newValue)
Used to update a value in the queue (or insert it).

Parameters:
node -
newValue -

extractMin

Node extractMin()
Retrieve and remove the node with the most optimal value.


peek

Node peek()
Retrieve without removing the node with the most optimal value.


isEmpty

boolean isEmpty()
Returns:
True if the queue is empty.


Copyright © 2002-2012 The Neo4j Graph Database Project. All Rights Reserved.