spire.algebra.free

FreeAbGroup

Related Docs: object FreeAbGroup | package free

final class FreeAbGroup[A] extends AnyVal

Self Type
FreeAbGroup[A]
Linear Supertypes
AnyVal, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. FreeAbGroup
  2. AnyVal
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

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

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

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

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

    Definition Classes
    Any
  5. def getClass(): Class[_ <: AnyVal]

    Definition Classes
    AnyVal → Any
  6. def inverse: FreeAbGroup[A]

  7. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  8. def run[B](f: (A) ⇒ B)(implicit B: AbGroup[B]): B

    Maps the terms using f to type B and sums their results using the AbGroup for B.

  9. def runMonoid[B](f: (A) ⇒ B)(implicit B: CMonoid[B]): Option[B]

    As long as there are no negative terms, this maps the terms using f, then sums the results using the CMonoid for B.

    As long as there are no negative terms, this maps the terms using f, then sums the results using the CMonoid for B. If there is a negative term, then None is returned.

  10. def runSemigroup[B](f: (A) ⇒ B)(implicit B: CSemigroup[B]): Option[B]

    As long as there are no negative terms and at least 1 positive term, this maps the terms using f, then sums the results using the CSemigroup for B.

    As long as there are no negative terms and at least 1 positive term, this maps the terms using f, then sums the results using the CSemigroup for B. If there is a negative term, or if there are no terms at all, then None is returned.

  11. def split[B](f: (A) ⇒ B)(implicit B: CMonoid[B]): (B, B)

    Sums up the results of the negative and positive terms separately, using f to map the terms to type B and using its CMonoid.

    Sums up the results of the negative and positive terms separately, using f to map the terms to type B and using its CMonoid. This returns a tuple with the sum of the negative terms on the left and the sum of the positive terms on the right.

  12. def splitSemigroup[B](f: (A) ⇒ B)(implicit B: CSemigroup[B]): (Option[B], Option[B])

    Sums up the results of the negative and positive terms separately, using f to map the terms to type B and using its CSemigroup.

    Sums up the results of the negative and positive terms separately, using f to map the terms to type B and using its CSemigroup. This returns a tuple with the sum of the negative terms on the left and the sum of the positive terms on the right. If either side has no terms at all, then that side is None.

  13. val terms: Map[A, Int]

  14. def toString(): String

    Definition Classes
    FreeAbGroup → Any
  15. def |+|(rhs: FreeAbGroup[A]): FreeAbGroup[A]

  16. def |-|(rhs: FreeAbGroup[A]): FreeAbGroup[A]

Inherited from AnyVal

Inherited from Any

Ungrouped