Trait

org.isarnproject.algebraAPI

AggregatorAPI

Related Doc: package algebraAPI

Permalink

trait AggregatorAPI[M, D] extends Serializable

Defines aggregation (aka map-reduce) on a monoidal aggregating type M and data type D

Linear Supertypes
Serializable, Serializable, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AggregatorAPI
  2. Serializable
  3. Serializable
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def aggregate(as: TraversableOnce[D]): M

    Permalink

    Given a sequence of data as, aggregate it into a value of monoidal type M

    Given a sequence of data as, aggregate it into a value of monoidal type M

    Aggregation has two equivalent definitions:

    aggregate(as) = monoid.combineAll(as.map(mf)) // The "map-reduce" definition

    aggregate(as) = as.foldLeft(monoid.empty)(lff) // The "left-folding" definition

    The left-folding definition is more efficient in general, and desirable for objects implementing the Aggregator trait when possible.

    http://erikerlandson.github.io/blog/2016/09/05/expressing-map-reduce-as-a-left-folding-monoid

  2. abstract def getClass(): Class[_]

    Permalink
    Definition Classes
    Any
  3. abstract def lff: (M, D) ⇒ M

    Permalink

    Return the left-folding function for this aggregator.

    Return the left-folding function for this aggregator.

    The function lff obeys the properties:

    lff(m, d) = monoid.combine(m, lff(monoid.empty, d))

    lff(m, d) = monoid.combine(m, mf(d))

  4. abstract def mf: (D) ⇒ M

    Permalink

    Return the mapping function for this aggregator.

    Return the mapping function for this aggregator.

    The function mf obeys the properties:

    monoid.combine(m, mf(d)) = lff(m, d)

  5. abstract def monoid: MonoidAPI[M]

    Permalink

    Return the object defining the monoidal properties on type M

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  6. def hashCode(): Int

    Permalink
    Definition Classes
    Any
  7. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  8. def toString(): String

    Permalink
    Definition Classes
    Any

Inherited from Serializable

Inherited from Serializable

Inherited from Any

Ungrouped