class IntAlgebra extends CommutativeRing[Int] with Serializable
- Source
- int.scala
- Alphabetic
- By Inheritance
- IntAlgebra
- CommutativeRing
- CommutativeRng
- CommutativeRig
- MultiplicativeCommutativeMonoid
- CommutativeSemiring
- MultiplicativeCommutativeSemigroup
- Ring
- Rng
- AdditiveCommutativeGroup
- AdditiveGroup
- Rig
- MultiplicativeMonoid
- Semiring
- MultiplicativeSemigroup
- AdditiveCommutativeMonoid
- AdditiveCommutativeSemigroup
- AdditiveMonoid
- AdditiveSemigroup
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new IntAlgebra()
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 additive: CommutativeGroup[Int]
- Definition Classes
- AdditiveCommutativeGroup → AdditiveCommutativeMonoid → AdditiveCommutativeSemigroup → AdditiveGroup → AdditiveMonoid → AdditiveSemigroup
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- 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 fromBigInt(n: BigInt): Int
Convert the given BigInt to an instance of A.
Convert the given BigInt to an instance of A.
This is equivalent to
n
repeated summations of this ring'sone
, or-n
summations of-one
ifn
is negative.Most type class instances should consider overriding this method for performance reasons.
- Definition Classes
- IntAlgebra → Ring
- def fromInt(n: Int): Int
Convert the given integer to an instance of A.
Convert the given integer to an instance of A.
Defined to be equivalent to
sumN(one, n)
.That is,
n
repeated summations of this ring'sone
, or-n
summations of-one
ifn
is negative.Most type class instances should consider overriding this method for performance reasons.
- Definition Classes
- IntAlgebra → Ring
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isOne(a: Int)(implicit ev: Eq[Int]): Boolean
Tests if
a
is one.Tests if
a
is one.- Definition Classes
- MultiplicativeMonoid
- def isZero(a: Int)(implicit ev: Eq[Int]): Boolean
Tests if
a
is zero.Tests if
a
is zero.- Definition Classes
- AdditiveMonoid
- def minus(x: Int, y: Int): Int
- Definition Classes
- IntAlgebra → AdditiveGroup
- def multiplicative: CommutativeMonoid[Int]
- Definition Classes
- MultiplicativeCommutativeMonoid → MultiplicativeCommutativeSemigroup → MultiplicativeMonoid → MultiplicativeSemigroup
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def negate(x: Int): Int
- Definition Classes
- IntAlgebra → AdditiveGroup
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def one: Int
- Definition Classes
- IntAlgebra → MultiplicativeMonoid
- def plus(x: Int, y: Int): Int
- Definition Classes
- IntAlgebra → AdditiveSemigroup
- def positivePow(a: Int, n: Int): Int
- Attributes
- protected[this]
- Definition Classes
- MultiplicativeSemigroup
- def positiveSumN(a: Int, n: Int): Int
- Attributes
- protected[this]
- Definition Classes
- AdditiveSemigroup
- def pow(x: Int, y: Int): Int
- Definition Classes
- IntAlgebra → MultiplicativeMonoid → MultiplicativeSemigroup
- def product(as: TraversableOnce[Int]): Int
Given a sequence of
as
, compute the product.Given a sequence of
as
, compute the product.- Definition Classes
- MultiplicativeMonoid
- Annotations
- @nowarn()
- def sum(as: TraversableOnce[Int]): Int
Given a sequence of
as
, compute the sum.Given a sequence of
as
, compute the sum.- Definition Classes
- AdditiveMonoid
- Annotations
- @nowarn()
- def sumN(a: Int, n: Int): Int
- Definition Classes
- AdditiveGroup → AdditiveMonoid → AdditiveSemigroup
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def times(x: Int, y: Int): Int
- Definition Classes
- IntAlgebra → MultiplicativeSemigroup
- def toString(): String
- Definition Classes
- AnyRef → Any
- def tryProduct(as: TraversableOnce[Int]): Option[Int]
Given a sequence of
as
, combine them and return the total.Given a sequence of
as
, combine them and return the total.If the sequence is empty, returns None. Otherwise, returns Some(total).
- Definition Classes
- MultiplicativeMonoid → MultiplicativeSemigroup
- Annotations
- @nowarn()
- def trySum(as: TraversableOnce[Int]): Option[Int]
Given a sequence of
as
, combine them and return the total.Given a sequence of
as
, combine them and return the total.If the sequence is empty, returns None. Otherwise, returns Some(total).
- Definition Classes
- AdditiveMonoid → AdditiveSemigroup
- Annotations
- @nowarn()
- 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()
- def zero: Int
- Definition Classes
- IntAlgebra → AdditiveMonoid