implicit final class ApsoSeq[T] extends AnyVal
Implicit class that provides new methods for sequences.
- Alphabetic
- By Inheritance
- ApsoSeq
- AnyVal
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
ApsoSeq(seq: Seq[T])
- seq
the sequence to which the new methods are provided
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
sample(percentage: Double): Seq[T]
Returns a subsequence of this sequence based on a percentage of the total number of elements.
Returns a subsequence of this sequence based on a percentage of the total number of elements.
- percentage
the percentage of elements of this sequence that the returned sequence must contain
- returns
a subsequence of this sequence based on a percentage of the total number of elements.
- val seq: Seq[T]
-
def
split(n: Int): IndexedSeq[Seq[T]]
Partitions this sequence into a given number of subsequences.
Partitions this sequence into a given number of subsequences. It is guaranteed that the sequence is split into subsquences as even as possible; if the split is uneven, the first
this.length % nsubsequences contain one more element than the remaining ones.- n
the number of subsequences into which this sequence must be split
- returns
a new sequence of
nsubsequences of this sequence.
-
def
takeLargest(n: Int)(implicit ord: Ordering[T]): Seq[T]
Returns a set containing the n largest elements of this sequence
Returns a set containing the n largest elements of this sequence
- n
number of elements to extract
- ord
element ordering
- returns
an unordered sequence of the n largest elements
-
def
takeSmallest(n: Int)(implicit ord: Ordering[T]): Seq[T]
Returns a set containing the n smallest elements of this sequence
Returns a set containing the n smallest elements of this sequence
- n
number of elements to extract
- ord
element ordering
- returns
an unordered sequence of the n smallest elements
-
def
toString(): String
- Definition Classes
- Any