object folds
List of predefined Folds
- Alphabetic
- By Inheritance
- folds
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
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
- def all[A](f: (A) => Boolean): FoldId[A, Boolean] { ... /* 2 definitions in type refinement */ }
- returns
return true if the list is empty or if all elements are true, use a Either state to indicate early failure
- def any[A](f: (A) => Boolean): FoldId[A, Boolean] { ... /* 2 definitions in type refinement */ }
- returns
return false if the list is empty or if all elements are false, use a Either state to indicate early success
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def average[A](implicit f: Fractional[A]): Fold[Id, A, A]
- returns
the average of all elements
- def averageDouble[A](implicit n: Numeric[A]): Fold[Id, A, Double]
- returns
the average of all elements
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def const[A, B](b: => B): Fold[[A]A, A, B] { ... /* 2 definitions in type refinement */ }
constant fold returning the same value at the end
- def count[A]: FoldState[A, Int]
- returns
fold to count elements
- def countLong[A]: FoldState[A, Long]
- returns
fold to count elements
- def countLongOf[A](predicate: (A) => Boolean): FoldState[A, Long]
- returns
fold to count elements
- def countOf[A](predicate: (A) => Boolean): FoldState[A, Int]
- returns
fold to count elements
- def countUnique[A]: FoldId[A, Int]
- returns
fold to count the number of unique elements
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def first[A]: FoldState[A, Option[A]]
- returns
the first element
- def firstN[A](n: Int): FoldId[A, List[A]] { type S = scala.collection.mutable.ListBuffer[A] }
- returns
the first n elements
- def flips[A]: FoldId[A, Int] { type S = Int }
- returns
the number of times an element changes its value
- def flipsLong[A]: FoldId[A, Long] { type S = Long }
- returns
the number of times an element changes its value
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def gradient[A, V](implicit arg0: Numeric[A], arg1: Numeric[V]): FoldId[(A, V), Double]
- returns
gradient of a given variable A, compared to another V
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def last[A]: FoldState[A, Option[A]]
- returns
the last element
- def lastN[A](n: Int): FoldId[A, List[A]] { type S = scala.collection.mutable.ListBuffer[A] }
- returns
the last n elements
- def lift[A, U](f: (A) => U): Fold[[A]A, A, Option[U]] { ... /* 2 definitions in type refinement */ }
lift a function to a fold that applies f to the last element
- def list[A]: FoldId[A, List[A]]
- returns
a Fold which simply accumulates elements into a List
- def maximum[A](implicit arg0: Ordering[A]): FoldState[A, Option[A]]
- returns
the minimum element
- def maximumOr[A](default: A)(implicit arg0: Ordering[A]): Fold[Id, A, A]
- returns
the maximum element or a default value
- def mean[N](implicit arg0: Fractional[N]): Fold[Id, N, N] { type S = (N, Int) }
- returns
the mean of elements
- def minimum[A](implicit arg0: Ordering[A]): FoldState[A, Option[A]]
- returns
the minimum element
- def minimumOr[A](default: A)(implicit arg0: Ordering[A]): Fold[Id, A, A]
- returns
the minimum element or a default value
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def onlineStddev[N](implicit arg0: Fractional[N]): Fold[Id, N, (Int, N, Double)]
- returns
the number of elements, mean and standard deviation
- def onlineUnbiasedVariance[N](implicit arg0: Fractional[N]): Fold[Id, N, (Int, N, N)]
- returns
the number of elements, mean and unbiased variance
- def onlineVariance[N](implicit arg0: Fractional[N]): Fold[Id, N, (Int, N, N)]
- returns
the number of elements, mean and variance
- def onlineVariation[N](implicit arg0: Fractional[N]): FoldId[N, (Int, N, N)]
- returns
the number of elements, mean and variation
- def plus[N](implicit arg0: Numeric[N]): FoldState[N, N]
- returns
a plus fold from a Num
- def plusBy[A, N](f: (A) => N)(implicit arg0: Numeric[N]): Fold[Id, A, N] { type S = N }
- returns
a plus fold from a mapping to a Num
- def proportion[A](predicate: (A) => Boolean): Fold[Id, A, Double]
- returns
the proportion of elements satisfying a given predicate
- def randomDouble[A]: FoldId[A, Option[Double]] { ... /* 2 definitions in type refinement */ }
a fold where the current state is a random Double
- def randomDoubleWithSeed[A](seed: Long): FoldId[A, Option[Double]] { ... /* 2 definitions in type refinement */ }
a fold where the current state is a random Double
- def randomInt[A]: FoldId[A, Option[Int]] { ... /* 2 definitions in type refinement */ }
a fold where the current state is a random Int
- def randomIntWithSeed[A](seed: Long): FoldId[A, Option[Int]] { ... /* 2 definitions in type refinement */ }
a fold where the current state is a random Int
- def randomWithGeneratorAndFunction[A, R](random: Random, f: (Random) => R): FoldId[A, Option[R]] { ... /* 2 definitions in type refinement */ }
create a fold for a mutable Random object
- def reservoirSampling[A]: FoldId[A, Option[A]] { ... /* 2 definitions in type refinement */ }
return an arbitrary streamed element so that each element has the same probability be chosen
- def stddev[N](implicit arg0: Fractional[N]): Fold[Id, N, Double]
- returns
the number of elements, mean and standard deviation
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def times[N](implicit arg0: Numeric[N]): FoldState[N, N]
- returns
a times fold from a Num
- def timesBy[A, N](f: (A) => N)(implicit arg0: Numeric[N]): Fold[Id, A, N] { type S = N }
- returns
a times fold from a mapping to a Num
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- 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()