SetSemiring

algebra.instances.SetSemiring
class SetSemiring[A] extends Semiring[Set[A]]

Attributes

Source
set.scala
Graph
Supertypes
trait Semiring[Set[A]]
trait AdditiveMonoid[Set[A]]
trait Serializable
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def plus(x: Set[A], y: Set[A]): Set[A]

Attributes

Source
set.scala
def times(x: Set[A], y: Set[A]): Set[A]

Attributes

Source
set.scala
def zero: Set[A]

Attributes

Source
set.scala

Inherited methods

def isZero(a: Set[A])(implicit ev: Eq[Set[A]]): Boolean

Tests if a is zero.

Tests if a is zero.

Attributes

Inherited from:
AdditiveMonoid
Source
Additive.scala

Attributes

Inherited from:
MultiplicativeSemigroup
Source
Multiplicative.scala
def pow(a: Set[A], n: Int): Set[A]

Attributes

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

Attributes

Definition Classes
Inherited from:
AdditiveMonoid
Source
Additive.scala

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

Inherited from:
MultiplicativeSemigroup
Source
Multiplicative.scala
override def trySum(as: IterableOnce[Set[A]]): Option[Set[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