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
-
def
allDistinct: Boolean
Determines whether all elements of this collection are unique, in other words, whether no two equal elements exist.
Determines whether all elements of this collection are unique, in other words, whether no two equal elements exist. For an empty collection, this is
true. -
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
Calculates the numerical mean value based on the supplied
Fractionaltype class. -
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]
Produces a multi-map of this collection, mapping each element to keys and values based on the supplied functions.
Produces a multi-map of this collection, mapping each element to keys and values based on the supplied functions. A multi-map is a
Mapwhere the values are collections.- K
the key type
- V
the value collection's element type
- Values
the collection type of the values
- key
the function that calculates the key from an element.
- value
the function that calculates a single value element from an element.
- cbfv
the builder factory for the values collection
-
def
toString(): String
- Definition Classes
- Any
-
def
variance(implicit num: Fractional[A]): A
Calculates the numerical variance value based on the supplied
Fractionaltype class.