Trait

spire.algebra

ZAlgebra

Related Doc: package algebra

Permalink

trait ZAlgebra[V] extends RingAlgebra[V, Int] with Ring[V]

Given any Ring[A] we can construct a RingAlgebra[A, Int]. This is possible since we can define fromInt on Ring generally.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ZAlgebra
  2. Ring
  3. Rig
  4. MultiplicativeMonoid
  5. RingAlgebra
  6. Rng
  7. Semiring
  8. MultiplicativeSemigroup
  9. Module
  10. AdditiveAbGroup
  11. AdditiveCMonoid
  12. AdditiveCSemigroup
  13. AdditiveGroup
  14. AdditiveMonoid
  15. AdditiveSemigroup
  16. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

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

    Permalink
    Definition Classes
    Any
  2. implicit abstract def scalar: Ring[Int]

    Permalink
    Definition Classes
    ZAlgebraModule
  3. implicit abstract def vector: Ring[V]

    Permalink

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. def additive: AbGroup[V]

    Permalink
  5. final def asInstanceOf[T0]: T0

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

    Permalink
    Definition Classes
    Any
  7. def fromInt(n: Int): V

    Permalink

    Defined to be equivalent to additive.sumn(one, n).

    Defined to be equivalent to additive.sumn(one, n). That is, n repeated summations of this ring's one, or -one if n is negative.

    Definition Classes
    ZAlgebraRing
  8. def hashCode(): Int

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

    Permalink
    Definition Classes
    Any
  10. def isOne(a: V)(implicit ev: Eq[V]): Boolean

    Permalink
    Definition Classes
    MultiplicativeMonoid
  11. def isZero(a: V)(implicit ev: Eq[V]): Boolean

    Permalink

    Tests if a is zero.

    Tests if a is zero.

    Definition Classes
    AdditiveMonoid
  12. def minus(v: V, w: V): V

    Permalink
    Definition Classes
    ZAlgebraAdditiveGroup
  13. def multiplicative: Monoid[V]

    Permalink
  14. def negate(v: V): V

    Permalink
    Definition Classes
    ZAlgebraAdditiveGroup
  15. def one: V

    Permalink
    Definition Classes
    ZAlgebraMultiplicativeMonoid
  16. def plus(v: V, w: V): V

    Permalink
    Definition Classes
    ZAlgebraAdditiveSemigroup
  17. def pow(a: V, n: Int): V

    Permalink

    This is similar to Semigroup#pow, except that a pow 0 is defined to be the multiplicative identity.

    This is similar to Semigroup#pow, except that a pow 0 is defined to be the multiplicative identity.

    Definition Classes
    RigSemiring
  18. def prod(as: TraversableOnce[V]): V

    Permalink

    Given a sequence of as, sum them using the monoid and return the total.

    Given a sequence of as, sum them using the monoid and return the total.

    Definition Classes
    MultiplicativeMonoid
  19. def prodOption(as: TraversableOnce[V]): Option[V]

    Permalink

    Given a sequence of as, sum them using the semigroup and return the total.

    Given a sequence of as, sum them using the semigroup and return the total.

    If the sequence is empty, returns None. Otherwise, returns Some(total).

    Definition Classes
    MultiplicativeSemigroup
  20. def prodn(a: V, n: Int): V

    Permalink

    Return a multiplied with itself n times.

    Return a multiplied with itself n times.

    Definition Classes
    MultiplicativeMonoidMultiplicativeSemigroup
  21. def prodnAboveOne(a: V, n: Int): V

    Permalink
    Attributes
    protected
    Definition Classes
    MultiplicativeSemigroup
  22. def sum(as: TraversableOnce[V]): V

    Permalink

    Given a sequence of as, sum them using the monoid and return the total.

    Given a sequence of as, sum them using the monoid and return the total.

    Definition Classes
    AdditiveMonoid
  23. def sumOption(as: TraversableOnce[V]): Option[V]

    Permalink

    Given a sequence of as, sum them using the semigroup and return the total.

    Given a sequence of as, sum them using the semigroup and return the total.

    If the sequence is empty, returns None. Otherwise, returns Some(total).

    Definition Classes
    AdditiveSemigroup
  24. def sumn(a: V, n: Int): V

    Permalink

    Return a added with itself n times.

    Return a added with itself n times.

    Definition Classes
    AdditiveGroupAdditiveMonoidAdditiveSemigroup
  25. def sumnAboveOne(a: V, n: Int): V

    Permalink
    Attributes
    protected
    Definition Classes
    AdditiveSemigroup
  26. def times(v: V, w: V): V

    Permalink
    Definition Classes
    ZAlgebraMultiplicativeSemigroup
  27. def timesl(r: Int, v: V): V

    Permalink
    Definition Classes
    ZAlgebraModule
  28. def timesr(v: V, r: Int): V

    Permalink
    Definition Classes
    Module
  29. def toString(): String

    Permalink
    Definition Classes
    Any
  30. def zero: V

    Permalink
    Definition Classes
    ZAlgebraAdditiveMonoid

Inherited from Ring[V]

Inherited from Rig[V]

Inherited from MultiplicativeMonoid[V]

Inherited from RingAlgebra[V, Int]

Inherited from Rng[V]

Inherited from Semiring[V]

Inherited from MultiplicativeSemigroup[V]

Inherited from Module[V, Int]

Inherited from AdditiveAbGroup[V]

Inherited from AdditiveCMonoid[V]

Inherited from AdditiveCSemigroup[V]

Inherited from AdditiveGroup[V]

Inherited from AdditiveMonoid[V]

Inherited from AdditiveSemigroup[V]

Inherited from Any

Ungrouped