forAdditiveCommutativeMonoid

algebra.ring.Signed$.forAdditiveCommutativeMonoid

Signed implementation for additive commutative monoids

Attributes

Source
Signed.scala
Graph
Supertypes
trait AdditiveMonoid[A]
trait Serializable
trait Signed[A]
class Any
Show all
Known subtypes

Members list

Value members

Concrete methods

Attributes

Definition Classes
Source
Signed.scala
def signum(a: A): Int

Returns 0 if a is 0, 1 if a is positive, and -1 is a is negative.

Returns 0 if a is 0, 1 if a is positive, and -1 is a is negative.

Attributes

Source
Signed.scala

Inherited methods

def abs(a: A): A

An idempotent function that ensures an object has a non-negative sign.

An idempotent function that ensures an object has a non-negative sign.

Attributes

Inherited from:
Signed
Source
Signed.scala
def isSignNegative(a: A): Boolean

Attributes

Inherited from:
Signed
Source
Signed.scala
def isSignNonNegative(a: A): Boolean

Attributes

Inherited from:
Signed
Source
Signed.scala
def isSignNonPositive(a: A): Boolean

Attributes

Inherited from:
Signed
Source
Signed.scala
def isSignNonZero(a: A): Boolean

Attributes

Inherited from:
Signed
Source
Signed.scala
def isSignPositive(a: A): Boolean

Attributes

Inherited from:
Signed
Source
Signed.scala
def isSignZero(a: A): Boolean

Attributes

Inherited from:
Signed
Source
Signed.scala
def isZero(a: A)(implicit ev: Eq[A]): Boolean

Tests if a is zero.

Tests if a is zero.

Attributes

Inherited from:
AdditiveMonoid
Source
Additive.scala
def order: Order[A]

Attributes

Inherited from:
Signed
Source
Signed.scala
def plus(x: A, y: A): A

Attributes

Inherited from:
AdditiveSemigroup
Source
Additive.scala
def sign(a: A): Sign

Returns Zero if a is 0, Positive if a is positive, and Negative is a is negative.

Returns Zero if a is 0, Positive if a is positive, and Negative is a is negative.

Attributes

Inherited from:
Signed
Source
Signed.scala
def sum(as: IterableOnce[A]): A

Given a sequence of as, compute the sum.

Given a sequence of as, compute the sum.

Attributes

Inherited from:
AdditiveMonoid
Source
Additive.scala
override def sumN(a: A, n: Int): A

Attributes

Definition Classes
Inherited from:
AdditiveMonoid
Source
Additive.scala
override def trySum(as: IterableOnce[A]): Option[A]

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).

Attributes

Definition Classes
Inherited from:
AdditiveMonoid
Source
Additive.scala
def zero: A

Attributes

Inherited from:
AdditiveMonoid
Source
Additive.scala