ShortAlgebra

algebra.instances.ShortAlgebra

Attributes

Source:
short.scala
Graph
Supertypes

Members list

Concise view

Value members

Concrete methods

override def fromBigInt(n: BigInt): Short

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's one, or -n summations of -one if n is negative.

Most type class instances should consider overriding this method for performance reasons.

Attributes

Definition Classes
Source:
short.scala
override def fromInt(n: Int): Short

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's one, or -n summations of -one if n is negative.

Most type class instances should consider overriding this method for performance reasons.

Attributes

Definition Classes
Source:
short.scala
override def minus(x: Short, y: Short): Short

Attributes

Definition Classes
Source:
short.scala
def negate(x: Short): Short

Attributes

Source:
short.scala
def one: Short

Attributes

Source:
short.scala
def plus(x: Short, y: Short): Short

Attributes

Source:
short.scala
override def pow(x: Short, y: Int): Short

Attributes

Definition Classes
Source:
short.scala
def times(x: Short, y: Short): Short

Attributes

Source:
short.scala
def zero: Short

Attributes

Source:
short.scala

Inherited methods

def isOne(a: Short)(implicit ev: Eq[Short]): Boolean

Tests if a is one.

Tests if a is one.

Attributes

Inherited from:
MultiplicativeMonoid
Source:
Multiplicative.scala
def isZero(a: Short)(implicit ev: Eq[Short]): Boolean

Tests if a is zero.

Tests if a is zero.

Attributes

Inherited from:
AdditiveMonoid
Source:
Additive.scala

Given a sequence of as, compute the product.

Given a sequence of as, compute the product.

Attributes

Inherited from:
MultiplicativeMonoid
Source:
Multiplicative.scala
def sum(as: IterableOnce[Short]): 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: Short, n: Int): A

Attributes

Definition Classes
Inherited from:
AdditiveGroup
Source:
Additive.scala
override def tryProduct(as: IterableOnce[Short]): 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:
MultiplicativeMonoid
Source:
Multiplicative.scala
override def trySum(as: IterableOnce[Short]): 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