org.neo4j.graphalgo.impl.shortestpath
Class DijkstraPriorityQueueFibonacciImpl<CostType>

java.lang.Object
  extended by org.neo4j.graphalgo.impl.shortestpath.DijkstraPriorityQueueFibonacciImpl<CostType>
Type Parameters:
CostType - The datatype the path weights are represented by.
All Implemented Interfaces:
DijkstraPriorityQueue<CostType>

public class DijkstraPriorityQueueFibonacciImpl<CostType>
extends Object
implements DijkstraPriorityQueue<CostType>

Implementation of DijkstraPriorityQueue using a FibonacciHeap


Nested Class Summary
protected  class DijkstraPriorityQueueFibonacciImpl.HeapObject
          Data structure used for the internal priority heap
 
Constructor Summary
DijkstraPriorityQueueFibonacciImpl(Comparator<CostType> costComparator)
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DijkstraPriorityQueueFibonacciImpl

public DijkstraPriorityQueueFibonacciImpl(Comparator<CostType> costComparator)
Method Detail

decreaseValue

public void decreaseValue(Node node,
                          CostType newValue)
Description copied from interface: DijkstraPriorityQueue
Used to update a value in the queue (or insert it).

Specified by:
decreaseValue in interface DijkstraPriorityQueue<CostType>

extractMin

public Node extractMin()
Description copied from interface: DijkstraPriorityQueue
Retrieve and remove the node with the most optimal value.

Specified by:
extractMin in interface DijkstraPriorityQueue<CostType>

insertValue

public void insertValue(Node node,
                        CostType value)
Description copied from interface: DijkstraPriorityQueue
Used to insert a new value into the queue.

Specified by:
insertValue in interface DijkstraPriorityQueue<CostType>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface DijkstraPriorityQueue<CostType>
Returns:
True if the queue is empty.

peek

public Node peek()
Description copied from interface: DijkstraPriorityQueue
Retrieve without removing the node with the most optimal value.

Specified by:
peek in interface DijkstraPriorityQueue<CostType>


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