cz.cuni.amis.utils.astar
Class AStarHeap<NODE>

Package class diagram package AStarHeap
java.lang.Object
  extended by cz.cuni.amis.utils.astar.AStarHeap<NODE>
All Implemented Interfaces:
Iterable<NODE>, Collection<NODE>

public class AStarHeap<NODE>
extends Object
implements Collection<NODE>

This is Heap used by AStar algorithm. Note that we assume that inserted Object has correctly implemented hashCode() and equals() function!


Constructor Summary
AStarHeap(Comparator<NODE> comp)
           
AStarHeap(Comparator<NODE> comp, int capacity)
           
 
Method Summary
 boolean add(NODE arg0)
           
 boolean addAll(Collection arg0)
           
 boolean addAll(NODE[] arg0)
           
 void clear()
           
 boolean contains(Object arg0)
           
 boolean containsAll(Collection arg0)
           
 boolean containsAll(Object[] arg0)
           
 boolean decreaseKey(NODE arg0)
           
 boolean deleteMin()
           
 boolean empty()
           
 NODE getMin()
           
 boolean isEmpty()
           
 Iterator<NODE> iterator()
           
static void main(String[] args)
           
static void mainAdd(AStarHeap heap, Integer[] nums)
           
static boolean mainCheck(AStarHeap heap, Integer[] nums)
           
static String mainToStr(Integer[] nums)
           
 boolean remove(Object arg0)
           
 boolean removeAll(Collection arg0)
           
 boolean retainAll(Collection arg0)
           
 int size()
           
 Object[] toArray()
           
 Object[] toArray(Object[] arg0)
           
 Set toSet()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Collection
equals, hashCode
 

Constructor Detail

AStarHeap

public AStarHeap(Comparator<NODE> comp,
                 int capacity)

AStarHeap

public AStarHeap(Comparator<NODE> comp)
Method Detail

getMin

public NODE getMin()

deleteMin

public boolean deleteMin()

decreaseKey

public boolean decreaseKey(NODE arg0)

add

public boolean add(NODE arg0)
Specified by:
add in interface Collection<NODE>

addAll

public boolean addAll(Collection arg0)
Specified by:
addAll in interface Collection<NODE>

addAll

public boolean addAll(NODE[] arg0)

clear

public void clear()
Specified by:
clear in interface Collection<NODE>

contains

public boolean contains(Object arg0)
Specified by:
contains in interface Collection<NODE>

containsAll

public boolean containsAll(Collection arg0)
Specified by:
containsAll in interface Collection<NODE>

containsAll

public boolean containsAll(Object[] arg0)

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection<NODE>

iterator

public Iterator<NODE> iterator()
Specified by:
iterator in interface Iterable<NODE>
Specified by:
iterator in interface Collection<NODE>

remove

public boolean remove(Object arg0)
Specified by:
remove in interface Collection<NODE>

removeAll

public boolean removeAll(Collection arg0)
Specified by:
removeAll in interface Collection<NODE>

retainAll

public boolean retainAll(Collection arg0)
Specified by:
retainAll in interface Collection<NODE>

size

public int size()
Specified by:
size in interface Collection<NODE>

empty

public boolean empty()

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection<NODE>

toArray

public Object[] toArray(Object[] arg0)
Specified by:
toArray in interface Collection<NODE>

toSet

public Set toSet()

mainToStr

public static String mainToStr(Integer[] nums)

mainCheck

public static boolean mainCheck(AStarHeap heap,
                                Integer[] nums)

mainAdd

public static void mainAdd(AStarHeap heap,
                           Integer[] nums)

main

public static void main(String[] args)


Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.