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.
- Alphabetic
- By Inheritance
- ZAlgebra
- Ring
- Rig
- MultiplicativeMonoid
- RingAlgebra
- Rng
- Semiring
- MultiplicativeSemigroup
- Module
- AdditiveAbGroup
- AdditiveCMonoid
- AdditiveCSemigroup
- AdditiveGroup
- AdditiveMonoid
- AdditiveSemigroup
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
Concrete 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
additive: AbGroup[V]
- Definition Classes
- AdditiveAbGroup → AdditiveCMonoid → AdditiveCSemigroup → AdditiveGroup → AdditiveMonoid → AdditiveSemigroup
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
equals(arg0: Any): Boolean
- Definition Classes
- Any
-
def
fromInt(n: Int): V
Defined to be equivalent to
additive.sumn(one, n). -
def
hashCode(): Int
- Definition Classes
- Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isOne(a: V)(implicit ev: Eq[V]): Boolean
- Definition Classes
- MultiplicativeMonoid
-
def
isZero(a: V)(implicit ev: Eq[V]): Boolean
Tests if
ais zero.Tests if
ais zero.- Definition Classes
- AdditiveMonoid
-
def
minus(v: V, w: V): V
- Definition Classes
- ZAlgebra → AdditiveGroup
-
def
multiplicative: Monoid[V]
- Definition Classes
- MultiplicativeMonoid → MultiplicativeSemigroup
-
def
negate(v: V): V
- Definition Classes
- ZAlgebra → AdditiveGroup
-
def
one: V
- Definition Classes
- ZAlgebra → MultiplicativeMonoid
-
def
plus(v: V, w: V): V
- Definition Classes
- ZAlgebra → AdditiveSemigroup
-
def
pow(a: V, n: Int): V
This is similar to
Semigroup#pow, except thata pow 0is defined to be the multiplicative identity. -
def
prod(as: TraversableOnce[V]): V
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
-
def
prodOption(as: TraversableOnce[V]): Option[V]
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
-
def
prodn(a: V, n: Int): V
Return
amultiplied with itselfntimes.Return
amultiplied with itselfntimes.- Definition Classes
- MultiplicativeMonoid → MultiplicativeSemigroup
-
def
prodnAboveOne(a: V, n: Int): V
- Attributes
- protected
- Definition Classes
- MultiplicativeSemigroup
-
def
sum(as: TraversableOnce[V]): V
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
-
def
sumOption(as: TraversableOnce[V]): Option[V]
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
-
def
sumn(a: V, n: Int): V
Return
aadded with itselfntimes.Return
aadded with itselfntimes.- Definition Classes
- AdditiveGroup → AdditiveMonoid → AdditiveSemigroup
-
def
sumnAboveOne(a: V, n: Int): V
- Attributes
- protected
- Definition Classes
- AdditiveSemigroup
-
def
times(v: V, w: V): V
- Definition Classes
- ZAlgebra → MultiplicativeSemigroup
- def timesl(r: Int, v: V): V
-
def
timesr(v: V, r: Int): V
- Definition Classes
- Module
-
def
toString(): String
- Definition Classes
- Any
-
def
zero: V
- Definition Classes
- ZAlgebra → AdditiveMonoid