/** * Creates a <code>MapBinaryHeap</code> whose heap ordering * will be based on the <i>natural ordering</i> of the elements, * which must be <code>Comparable</code>. */ public MapBinaryHeap() { initialize(new ComparableComparator()); }
/** * Creates a <code>MapBinaryHeap</code> based on the specified collection * whose heap ordering will be based on the <i>natural ordering</i> of the * elements, which must be <code>Comparable</code>. */ public MapBinaryHeap(Collection<T> c) { this(); addAll(c); }
/** * Returns * <code>KullbackLeibler(dist, reference) + KullbackLeibler(reference, dist)</code> * . * * @see #KullbackLeibler(double[], double[]) */ public static double symmetricKL(double[] dist, double[] reference) { return KullbackLeibler(dist, reference) + KullbackLeibler(reference, dist); }
@Override public boolean done() { if(delegate instanceof IterativeContext) { return ((IterativeContext)delegate).done(); } return true; }
/** * @see edu.uci.ics.jung.algorithms.util.IterativeContext#done() */ public void step() { if(delegate instanceof IterativeContext) { ((IterativeContext)delegate).step(); } }
@Override public boolean offer(T o) { return add(o); }
/** * Creates a <code>MapBinaryHeap</code> whose heap ordering * is based on the ordering of the elements specified by <code>comp</code>. * @param comp the comparator to use to order elements in the heap */ public MapBinaryHeap(Comparator<T> comp) { initialize(comp); }
/** * Creates a <code>MapBinaryHeap</code> whose heap ordering * will be based on the <i>natural ordering</i> of the elements, * which must be <code>Comparable</code>. */ public MapBinaryHeap() { initialize(new ComparableComparator()); }
/** * Creates a <code>MapBinaryHeap</code> based on the specified * collection whose heap ordering * will be based on the <i>natural ordering</i> of the elements, * which must be <code>Comparable</code>. * @param c the collection of {@code Comparable} elements to add to the heap */ public MapBinaryHeap(Collection<T> c) { this(); addAll(c); }
/** * @see edu.uci.ics.jung.algorithms.util.IterativeContext#done() */ public boolean done() { if(delegate instanceof IterativeContext) { return ((IterativeContext)delegate).done(); } return true; }
public void step() { if(delegate instanceof IterativeContext) { ((IterativeContext)delegate).step(); } }
/** * @param dist the distribution whose divergence from {@code reference} is being measured * @param reference the reference distribution * @return <code>KullbackLeibler(dist, reference) + KullbackLeibler(reference, dist)</code> * @see #KullbackLeibler(double[], double[]) */ public static double symmetricKL(double[] dist, double[] reference) { return KullbackLeibler(dist, reference) + KullbackLeibler(reference, dist); }
/** * Creates a <code>MapBinaryHeap</code> whose heap ordering is based on the * ordering of the elements specified by <code>c</code>. */ public MapBinaryHeap(Comparator<T> comp) { initialize(comp); }
/** * Creates a <code>MapBinaryHeap</code> whose heap ordering will be based on the <i>natural * ordering</i> of the elements, which must be <code>Comparable</code>. */ public MapBinaryHeap() { initialize(new ComparableComparator()); }
/** * Creates a <code>MapBinaryHeap</code> based on the specified * collection whose heap ordering * will be based on the <i>natural ordering</i> of the elements, * which must be <code>Comparable</code>. */ public MapBinaryHeap(Collection<T> c) { this(); addAll(c); }
/** * @see edu.uci.ics.jung.algorithms.layout.Layout#done() */ public boolean done() { if(delegate instanceof IterativeContext) { return ((IterativeContext)delegate).done(); } return true; }
/** * Creates a <code>MapBinaryHeap</code> whose heap ordering will be based on * the <i>natural ordering</i> of the elements, which must be * <code>Comparable</code>. */ public MapBinaryHeap() { initialize(new ComparableComparator()); }
/** * Creates a <code>MapBinaryHeap</code> based on the specified collection * whose heap ordering is based on the ordering of the elements specified by * <code>c</code>. */ public MapBinaryHeap(Collection<T> c, Comparator<T> comp) { this(comp); addAll(c); }
/** * Creates a <code>MapBinaryHeap</code> based on the specified collection * whose heap ordering * is based on the ordering of the elements specified by <code>c</code>. * @param c the collection of elements to add to the heap * @param comp the comparator to use for items in {@code c} */ public MapBinaryHeap(Collection<T> c, Comparator<T> comp) { this(comp); addAll(c); }
/** * Creates a <code>MapBinaryHeap</code> based on the specified collection whose heap ordering is * based on the ordering of the elements specified by <code>c</code>. * * @param c the collection of elements to add to the heap * @param comp the comparator to use for items in {@code c} */ public MapBinaryHeap(Collection<T> c, Comparator<T> comp) { this(comp); addAll(c); }