LongAlgebra

algebra.instances.LongAlgebra

Attributes

Source:
long.scala
Graph
Supertypes

Members list

Concise view

Value members

Concrete methods

override def fromBigInt(n: BigInt): Long

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:
long.scala
override def fromInt(n: Int): Long

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:
long.scala
override def minus(x: Long, y: Long): Long

Attributes

Definition Classes
Source:
long.scala
def negate(x: Long): Long

Attributes

Source:
long.scala
def one: Long

Attributes

Source:
long.scala
def plus(x: Long, y: Long): Long

Attributes

Source:
long.scala
override def pow(x: Long, y: Int): Long

Attributes

Definition Classes
Source:
long.scala
def times(x: Long, y: Long): Long

Attributes

Source:
long.scala
def zero: Long

Attributes

Source:
long.scala

Inherited methods

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

Tests if a is one.

Tests if a is one.

Attributes

Inherited from:
MultiplicativeMonoid
Source:
Multiplicative.scala
def isZero(a: Long)(implicit ev: Eq[Long]): 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[Long]): 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: Long, n: Int): A

Attributes

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