Uses of Class
io.vavr.collection.PriorityQueueBase.Node
-
Packages that use PriorityQueueBase.Node Package Description io.vavr.collection Purely functional collections based on Traversable. -
-
Uses of PriorityQueueBase.Node in io.vavr.collection
Fields in io.vavr.collection with type parameters of type PriorityQueueBase.Node Modifier and Type Field Description (package private) Seq<PriorityQueueBase.Node<T>>PriorityQueueBase.Node. childrenprivate Seq<PriorityQueueBase.Node<T>>PriorityQueue. forestMethods in io.vavr.collection that return PriorityQueueBase.Node Modifier and Type Method Description (package private) static <T> PriorityQueueBase.Node<T>PriorityQueueBase. findMin(java.util.Comparator<? super T> comparator, Seq<PriorityQueueBase.Node<T>> forest)Find the minimum root in the forest(package private) PriorityQueueBase.Node<T>PriorityQueueBase.Node. link(java.util.Comparator<? super T> comparator, PriorityQueueBase.Node<T> tree)(package private) static <T> PriorityQueueBase.Node<T>PriorityQueueBase.Node. of(T value, int rank, Seq<PriorityQueueBase.Node<T>> children)(package private) PriorityQueueBase.Node<T>PriorityQueueBase.Node. skewLink(java.util.Comparator<? super T> comparator, PriorityQueueBase.Node<T> left, PriorityQueueBase.Node<T> right)Methods in io.vavr.collection that return types with arguments of type PriorityQueueBase.Node Modifier and Type Method Description (package private) Seq<PriorityQueueBase.Node<T>>PriorityQueueBase.Node. appendTo(Seq<PriorityQueueBase.Node<T>> forest)(package private) static <T> Tuple2<T,Seq<PriorityQueueBase.Node<T>>>PriorityQueueBase. deleteMin(java.util.Comparator<? super T> comparator, Seq<PriorityQueueBase.Node<T>> forest)fun deleteMin [] = raise EMPTY * | deleteMin ts = * val (Node (x,r,c), ts) = getMin ts * val (ts',xs') = split ([],[],c) * in fold insert xs' (meld (ts, ts')) endprivate static <T> Seq<PriorityQueueBase.Node<T>>PriorityQueueBase. ins(java.util.Comparator<? super T> comparator, PriorityQueueBase.Node<T> tree, Seq<PriorityQueueBase.Node<T>> forest)fun ins (t, []) = [t] * | ins (t, t' :: ts) = (∗ rank t ≤ rank t' ∗) * if rank t < rank t' then t :: t' :: ts * else ins (link (t, t'), ts)(package private) static <T> Seq<PriorityQueueBase.Node<T>>PriorityQueueBase. insert(java.util.Comparator<? super T> comparator, T element, Seq<PriorityQueueBase.Node<T>> forest)fun insert (x, ts as t1 :: t2 :: rest) = * if rank t1 = rank t2 then skewLink(Node(x,0,[]),t1,t2) :: rest * else Node (x,0,[]) :: ts * | insert (x, ts) = Node (x,0,[]) :: ts(package private) static <T> Seq<PriorityQueueBase.Node<T>>PriorityQueueBase. meld(java.util.Comparator<? super T> comparator, Seq<PriorityQueueBase.Node<T>> source, Seq<PriorityQueueBase.Node<T>> target)fun meld (ts, ts') = meldUniq (uniqify ts, uniqify ts')private static <T> Seq<PriorityQueueBase.Node<T>>PriorityQueueBase. meldUnique(java.util.Comparator<? super T> comparator, Seq<PriorityQueueBase.Node<T>> forest1, Seq<PriorityQueueBase.Node<T>> forest2)fun meldUniq ([], ts) = ts * | meldUniq (ts, []) = ts * | meldUniq (t1 :: ts1, t2 :: ts2) = * if rank t1 < rank t2 then t1 :: meldUniq (ts1, t2 :: ts2) * else if rank t2 < rank t1 then t2 :: meldUniq (t1 :: ts1, ts2) * else ins (link (t1, t2), meldUniq (ts1, ts2))private static <T> Seq<PriorityQueueBase.Node<T>>PriorityQueueBase. rebuild(java.util.Comparator<? super T> comparator, Seq<PriorityQueueBase.Node<T>> forest)Separate the rank 0 trees from the rest, rebuild the 0 rank ones and merge them backprivate static <T> Seq<PriorityQueueBase.Node<T>>PriorityQueueBase. uniqify(java.util.Comparator<? super T> comparator, Seq<PriorityQueueBase.Node<T>> forest)fun uniqify [] = [] * | uniqify (t :: ts) = ins (t, ts) (∗ eliminate initial duplicate ∗)Methods in io.vavr.collection with parameters of type PriorityQueueBase.Node Modifier and Type Method Description private static <T> Seq<PriorityQueueBase.Node<T>>PriorityQueueBase. ins(java.util.Comparator<? super T> comparator, PriorityQueueBase.Node<T> tree, Seq<PriorityQueueBase.Node<T>> forest)fun ins (t, []) = [t] * | ins (t, t' :: ts) = (∗ rank t ≤ rank t' ∗) * if rank t < rank t' then t :: t' :: ts * else ins (link (t, t'), ts)(package private) PriorityQueueBase.Node<T>PriorityQueueBase.Node. link(java.util.Comparator<? super T> comparator, PriorityQueueBase.Node<T> tree)(package private) PriorityQueueBase.Node<T>PriorityQueueBase.Node. skewLink(java.util.Comparator<? super T> comparator, PriorityQueueBase.Node<T> left, PriorityQueueBase.Node<T> right)Method parameters in io.vavr.collection with type arguments of type PriorityQueueBase.Node Modifier and Type Method Description (package private) Seq<PriorityQueueBase.Node<T>>PriorityQueueBase.Node. appendTo(Seq<PriorityQueueBase.Node<T>> forest)(package private) static <T> Tuple2<T,Seq<PriorityQueueBase.Node<T>>>PriorityQueueBase. deleteMin(java.util.Comparator<? super T> comparator, Seq<PriorityQueueBase.Node<T>> forest)fun deleteMin [] = raise EMPTY * | deleteMin ts = * val (Node (x,r,c), ts) = getMin ts * val (ts',xs') = split ([],[],c) * in fold insert xs' (meld (ts, ts')) end(package private) static <T> PriorityQueueBase.Node<T>PriorityQueueBase. findMin(java.util.Comparator<? super T> comparator, Seq<PriorityQueueBase.Node<T>> forest)Find the minimum root in the forestprivate static <T> Seq<PriorityQueueBase.Node<T>>PriorityQueueBase. ins(java.util.Comparator<? super T> comparator, PriorityQueueBase.Node<T> tree, Seq<PriorityQueueBase.Node<T>> forest)fun ins (t, []) = [t] * | ins (t, t' :: ts) = (∗ rank t ≤ rank t' ∗) * if rank t < rank t' then t :: t' :: ts * else ins (link (t, t'), ts)(package private) static <T> Seq<PriorityQueueBase.Node<T>>PriorityQueueBase. insert(java.util.Comparator<? super T> comparator, T element, Seq<PriorityQueueBase.Node<T>> forest)fun insert (x, ts as t1 :: t2 :: rest) = * if rank t1 = rank t2 then skewLink(Node(x,0,[]),t1,t2) :: rest * else Node (x,0,[]) :: ts * | insert (x, ts) = Node (x,0,[]) :: ts(package private) static <T> Seq<PriorityQueueBase.Node<T>>PriorityQueueBase. meld(java.util.Comparator<? super T> comparator, Seq<PriorityQueueBase.Node<T>> source, Seq<PriorityQueueBase.Node<T>> target)fun meld (ts, ts') = meldUniq (uniqify ts, uniqify ts')private static <T> Seq<PriorityQueueBase.Node<T>>PriorityQueueBase. meldUnique(java.util.Comparator<? super T> comparator, Seq<PriorityQueueBase.Node<T>> forest1, Seq<PriorityQueueBase.Node<T>> forest2)fun meldUniq ([], ts) = ts * | meldUniq (ts, []) = ts * | meldUniq (t1 :: ts1, t2 :: ts2) = * if rank t1 < rank t2 then t1 :: meldUniq (ts1, t2 :: ts2) * else if rank t2 < rank t1 then t2 :: meldUniq (t1 :: ts1, ts2) * else ins (link (t1, t2), meldUniq (ts1, ts2))(package private) static <T> PriorityQueueBase.Node<T>PriorityQueueBase.Node. of(T value, int rank, Seq<PriorityQueueBase.Node<T>> children)private static <T> Seq<PriorityQueueBase.Node<T>>PriorityQueueBase. rebuild(java.util.Comparator<? super T> comparator, Seq<PriorityQueueBase.Node<T>> forest)Separate the rank 0 trees from the rest, rebuild the 0 rank ones and merge them backprivate static <T> Seq<PriorityQueueBase.Node<T>>PriorityQueueBase. uniqify(java.util.Comparator<? super T> comparator, Seq<PriorityQueueBase.Node<T>> forest)fun uniqify [] = [] * | uniqify (t :: ts) = ins (t, ts) (∗ eliminate initial duplicate ∗)private PriorityQueue<T>PriorityQueue. with(Seq<PriorityQueueBase.Node<T>> forest, int size)Constructor parameters in io.vavr.collection with type arguments of type PriorityQueueBase.Node Constructor Description Node(T root, int rank, Seq<PriorityQueueBase.Node<T>> children)PriorityQueue(java.util.Comparator<? super T> comparator, Seq<PriorityQueueBase.Node<T>> forest, int size)
-