object Seqs
- Alphabetic
- By Inheritance
- Seqs
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- abstract class BS_Result extends AnyRef
- abstract class FAS_RESULT[+A] extends AnyRef
- case class FilteredSorted[A](res: Array[A]) extends FAS_RESULT[A] with Product with Serializable
- case class Found(index: Int) extends BS_Result with Product with Serializable
- case class FoundBadElement[A](badElement: A) extends FAS_RESULT[A] with Product with Serializable
- case class NotFound(nextBiggerElement: Int) extends BS_Result with Product with Serializable
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def binIntersect[A, B](aEls: Iterator[A], bEls: IndexedSeq[B], compare: (A, B) => Int): Iterator[(A, B)]
Compute the intersection of two sequences in (strictly) ascending order.
Compute the intersection of two sequences in (strictly) ascending order. The procedure uses binary search on the second list, and should in particular perform well if the second list is much bigger than the first list.
compareshould return a negative number of theaargument is smaller than thebargument, a positive number ifaargument is bigger thanb,0otherwise. - def binSearch[T](seq: IndexedSeq[T], begin: Int, end: Int, wanted: T)(implicit ord: Ordering[T]): BS_Result
Binary search for an element in a sorted random-access sequent.
Binary search for an element in a sorted random-access sequent. The result is either
Found(i), whereiis the index of some occurrence ofwantedinseq, orNotFound(i), whereiis the index of the next-bigger element inseq. Note, that elements are never compared with==, only with(a compare b) == 0 - def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- def computeHashCode[A](a: Iterable[A], init: Int, multiplier: Int): Int
- def computeHashCode[A](a: Iterator[A], init: Int, multiplier: Int): Int
Compute a polynomial hashcode for a sequence of things
- def count[A](els: Iterator[A], p: (A) => Boolean): Int
- def count[A](els: Iterable[A], p: (A) => Boolean): Int
- def diff[A](newSeq: IndexedSeq[A], oldSeq: IndexedSeq[A])(implicit ord: Ordering[A]): (IndexedSeq[A], IndexedSeq[A])
Given to sequences that are totally sorted in the same descending order, determine those elements in
newSeqthat also occur inoldSeq, and those elements innewSeqthat do not occur inoldSeq. - def diff3[A](seq0: IndexedSeq[A], seq1: IndexedSeq[A])(implicit ord: Ordering[A]): (IndexedSeq[A], IndexedSeq[A], IndexedSeq[A])
Given to sequences that are totally sorted in the same descending order, determine those elements that only occur in
seq0, those that occur in both sequences, and those that only occur inseq1. - def disjoint[A](a: Set[A], b: Set[A], c: Set[A]): Boolean
Determine whether 3 given sets have any elements in common
- def disjoint[A](a: Set[A], b: Set[A]): Boolean
- def disjointSeq[A](a1: Set[A], a2: Set[A], b: Iterator[A]): Boolean
- def disjointSeq[A](a1: Set[A], a2: Set[A], b: Iterable[A]): Boolean
- def disjointSeq[A](a: Set[A], b: Iterable[A]): Boolean
- def disjointSeq[A](a: Set[A], b: Iterator[A]): Boolean
- def doubleIterator[A](a: A, b: A): Iterator[A]
Iterator over exactly two elements
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def filterAndSort[A](it: Iterator[A], skipEl: (A) => Boolean, badEl: (A) => Boolean, trafo: (A) => A, comesBefore: (A, A) => Boolean)(implicit arg0: ClassTag[A]): FAS_RESULT[A]
Filter a sequence of objects in order to detect the existence of certain bad objects (
badEl) and to remove certain unnecessary objects (skipEl).Filter a sequence of objects in order to detect the existence of certain bad objects (
badEl) and to remove certain unnecessary objects (skipEl). If a bad element is found,FoundBadElementis returned, otherwise a sorted array with the elements that were kept is created and returned. - def findDuplicates[A](els: Iterator[A]): Set[A]
Determine all elements that occur in more than one of the given collections
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def identicalSeqs[A <: AnyRef](a: Iterable[A], b: Iterable[A]): Boolean
Determine whether the two given sequences/iterables contain reference-identical objects.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def lexCombineInts(int1: Int, _int2: => Int, _int3: => Int, _int4: => Int): Int
- def lexCombineInts(int1: Int, _int2: => Int, _int3: => Int): Int
- def lexCombineInts(int1: Int, int2: => Int): Int
Interpret the given integers as results of a
comparefunction (negative, zero, positive for less, equal, greater) and combine them lexicographically - def lexCompare[T](it1: Iterator[T], it2: Iterator[T])(implicit ord: Ordering[T]): Int
Lexicographic comparison of two lists of things
- def lexCompareOrdering[T](it1: Iterator[T], it2: Iterator[T])(implicit ord: Ordering[T]): Int
- def mapValuesStrict[A, B, C](m: Map[A, B], f: (B) => C): Map[A, C]
Strict function to apply a function to the values of some map.
- def max[A, B](it: Iterator[A], measure: (A) => B)(implicit arg0: (B) => Ordered[B]): A
Determine a maximum element of a sequence of things under a given measure
- def max(els: Iterable[Int]): Int
Compute the maximum of a sequence of ints.
Compute the maximum of a sequence of ints. If the sequence is empty,
0is returned - def max(it: Iterator[Int]): Int
Compute the maximum of a sequence of ints.
Compute the maximum of a sequence of ints. If the sequence is empty,
0is returned - def mergeSortedSeqs[A](aIt: Iterator[A], bIt: Iterator[A])(implicit ord: Ordering[A]): IndexedSeq[A]
Merge two sequences that are sorted in strictly descending order and produce a descending sequence with all elements occurring in at least one of the sequences
- def mergeSortedSeqs[A](a: IndexedSeq[A], b: IndexedSeq[A])(implicit ord: Ordering[A]): IndexedSeq[A]
Merge two sequences that are sorted in strictly descending order and produce a descending sequence with all elements occurring in at least one of the sequences
- def min[A, B](it: Iterator[A], measure: (A) => B)(implicit arg0: (B) => Ordered[B]): A
Determine a minimum element of a sequence of things under a given measure
- def min[A, B](it: Iterable[A], measure: (A) => B)(implicit arg0: (B) => Ordered[B]): A
Determine a minimum element of a sequence of things under a given measure
- def min(it: Iterator[Int]): Int
Compute the minimum of a sequence of ints.
Compute the minimum of a sequence of ints. If the sequence is empty,
0is returned - def minOption[A, B](it: Iterator[A], measure: (A) => Option[B])(implicit arg0: (B) => Ordered[B]): Option[A]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def optionMax(a: Option[IdealInt], b: Option[IdealInt]): Option[IdealInt]
Max on optional integers
- def optionMin(a: Option[IdealInt], b: Option[IdealInt]): Option[IdealInt]
Min on optional integers
- def optionSum(vals: Iterator[Option[Int]]): Option[Int]
Return the sum of the given numbers if all numbers are defined,
Noneotherwise. - def partialMinBy[A, B](it: Iterator[A], f: (A) => B)(implicit cmp: PartialOrdering[B]): A
Determine a minimum element of a sequence of things under a given measure
- def prepend[A](els: Iterable[A], l: List[A]): List[A]
Prepend some elements in front of a list
- def reduceLeft[A](els: Iterable[A], f: (A, A) => A): Option[A]
reduceLeft that also works for empty sequences
- def reduceLeft[A](els: Iterator[A], f: (A, A) => A): Option[A]
reduceLeft that also works for empty sequences
- def reduceToSize[A](b: Buffer[A], newSize: Int): Unit
Remove last elements from the buffer
- def removeDuplicates[A](s: IndexedSeq[A]): IndexedSeq[A]
Remove all duplicates from a sorted sequence.
Remove all duplicates from a sorted sequence. It is assumed that duplicates can only occur immediately following each other
- def removeLast[A](b: Buffer[A]): Unit
Remove the last element of some buffer.
- def risingEdge[A](ar: IndexedSeq[A], p: (A) => Boolean): Int
Find the first index
indwithp(ar(ind)); return0ifpistrueon the whole sequence, andendifpisfalseon the whole sequence.Find the first index
indwithp(ar(ind)); return0ifpistrueon the whole sequence, andendifpisfalseon the whole sequence.phas to be monotonic onar, i.e., ifp(ar(ind))thenp(ar(ind + 1)). - def risingEdgeBwd[A](ar: IndexedSeq[A], p: (A) => Boolean, start: Int): Int
Going backward, find the first index
indin the range[0, start)withp(ar(ind)); return0ifpistrueon[0, start), andstartifpisfalseon[0, start).Going backward, find the first index
indin the range[0, start)withp(ar(ind)); return0ifpistrueon[0, start), andstartifpisfalseon[0, start).phas to be monotonic onar, i.e., ifp(ar(ind))thenp(ar(ind + 1)). - def risingEdgeBwdFull[A](ar: IndexedSeq[A], p: (A) => Boolean, start: Int, begin: Int): Int
Going backward, find the first index
indin the range[begin, start)withp(ar(ind)); returnbeginifpistrueon[begin, start), andstartifpisfalseon[begin, start).Going backward, find the first index
indin the range[begin, start)withp(ar(ind)); returnbeginifpistrueon[begin, start), andstartifpisfalseon[begin, start).phas to be monotonic onar, i.e., ifp(ar(ind))thenp(ar(ind + 1)). - def risingEdgeFull[A](ar: IndexedSeq[A], p: (A) => Boolean, begin: Int, end: Int): Int
Find the first index
indin the range[begin, end)withp(ar(ind)); returnbeginifpistrueon[begin, end), andendifpisfalseon[begin, end).Find the first index
indin the range[begin, end)withp(ar(ind)); returnbeginifpistrueon[begin, end), andendifpisfalseon[begin, end).phas to be monotonic onar, i.e., ifp(ar(ind))thenp(ar(ind + 1)). - def risingEdgeFwd[A](ar: IndexedSeq[A], p: (A) => Boolean, start: Int): Int
Going forward, find the first index
indin the range[start, ar.size)withp(ar(ind)); returnstartifpistrueon[start, ar.size), andar.sizeifpisfalseon[start, ar.size).Going forward, find the first index
indin the range[start, ar.size)withp(ar(ind)); returnstartifpistrueon[start, ar.size), andar.sizeifpisfalseon[start, ar.size).phas to be monotonic onar, i.e., ifp(ar(ind))thenp(ar(ind + 1)). - def risingEdgeFwdFull[A](ar: IndexedSeq[A], p: (A) => Boolean, start: Int, end: Int): Int
Going forward, find the first index
indin the range[start, end)withp(ar(ind)); returnstartifpistrueon[start, end), andendifpisfalseon[start, end).Going forward, find the first index
indin the range[start, end)withp(ar(ind)); returnstartifpistrueon[start, end), andendifpisfalseon[start, end).phas to be monotonic onar, i.e., ifp(ar(ind))thenp(ar(ind + 1)). - def so2os[T](l: Seq[Option[T]]): Option[Seq[T]]
Convert a sequence of options to an optional sequence.
- def some[A](vals: Iterable[Option[A]]): Option[A]
- def some[A](vals: Iterator[Option[A]]): Option[A]
Return the first
Some(x)of the given sequence, orNoneif none exists - def split[A](els: Iterator[A], firstKind: (A) => Boolean): (Vector[A], Vector[A])
Split a sequence of things into two sequences, one with all the elements for which certain predicate holds, and one with the elements for which the predicate does not hold
- def subSeq[A](a: Iterator[A], aFilter: Set[A], b: Iterator[A]): Boolean
Determine whether
aoccurs inbas a sub-sequence - def subSeq[A](a: Iterator[A], b: Iterator[A]): Boolean
Determine whether
aoccurs inbas a sub-sequence - final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toArray[A](els: Iterator[A])(implicit arg0: ClassTag[A]): Array[A]
- def toStream[A](f: (Int) => A): Stream[A]
Lazily convert a function (over naturals) to a stream
- def toString(): String
- Definition Classes
- AnyRef → Any
- def tripleIterator[A](a: A, b: A, c: A): Iterator[A]
Iterator over exactly three elements
- def union[A](sets: Iterator[Set[A]]): Set[A]
Compute union of a sequence of sets.
- def union[A](sets: Iterable[Set[A]]): Set[A]
Compute union of a sequence of sets.
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)