implicit final class KollFlitzIterable[A, CC[~] <: Iterable[~]] extends AnyVal
Enrichment methods for any type of collection, sequential or not.
- Alphabetic
- By Inheritance
- KollFlitzIterable
- AnyVal
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new KollFlitzIterable(self: CC[A])
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
counted: Map[A, Int]
Produces a map from the input elements to the frequency in which they appear in the input collection.
Produces a map from the input elements to the frequency in which they appear in the input collection.
For example: {{ val x = List("a", "a", "b", "a") val m = x.counted }}
produces
Map("a" -> 3, "b" -> 1). The map has a default value of zero, so callingm("c")returns zero.- returns
a map with the elements counted.
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def mean(implicit num: Fractional[A]): A
-
def
meanVariance(implicit num: Fractional[A]): (A, A)
Calculates the mean and variance of the collection.
Calculates the mean and variance of the collection.
- num
numerical view of the element type
- returns
a tuple consisting of
_1mean and_2variance.
-
def
normalized(implicit num: Fractional[A], cbf: CanBuildFrom[CC[A], A, CC[A]]): CC[A]
Normalizes the elements by finding the maximum absolute value and dividing each element by this value.
Normalizes the elements by finding the maximum absolute value and dividing each element by this value.
If the collection is empty or the maximum absolute value is zero, the original collection is returned.
- num
numerical view of the element type
- val self: CC[A]
- def toMultiMap[K, V, Values](key: (A) ⇒ K)(value: (A) ⇒ V)(implicit cbfv: CanBuildFrom[Nothing, V, Values]): Map[K, Values]
-
def
toString(): String
- Definition Classes
- Any
- def variance(implicit num: Fractional[A]): A