MapSemiring

algebra.instances.MapSemiring
class MapSemiring[K, V](implicit V: Semiring[V]) extends MapAdditiveMonoid[K, V] with Semiring[Map[K, V]]

Attributes

Source:
map.scala
Graph
Supertypes
trait Semiring[Map[K, V]]
class MapAdditiveMonoid[K, V]
trait AdditiveMonoid[Map[K, V]]
trait AdditiveSemigroup[Map[K, V]]
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

override def pow(x: Map[K, V], n: Int): Map[K, V]

Attributes

Definition Classes
Source:
map.scala
def times(xs: Map[K, V], ys: Map[K, V]): Map[K, V]

Attributes

Source:
map.scala
override def tryProduct(as: IterableOnce[Map[K, V]]): Option[Map[K, V]]

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
Source:
map.scala

Inherited methods

def isZero(a: Map[K, V])(implicit ev: Eq[Map[K, V]]): Boolean

Tests if a is zero.

Tests if a is zero.

Attributes

Inherited from:
AdditiveMonoid
Source:
Additive.scala
def plus(xs: Map[K, V], ys: Map[K, V]): Map[K, V]

Attributes

Inherited from:
MapAdditiveMonoid
Source:
map.scala
override def sum(as: IterableOnce[Map[K, V]]): Map[K, V]

Given a sequence of as, compute the sum.

Given a sequence of as, compute the sum.

Attributes

Definition Classes
Inherited from:
MapAdditiveMonoid
Source:
map.scala
override def sumN(a: Map[K, V], n: Int): Map[K, V]

Attributes

Definition Classes
Inherited from:
MapAdditiveMonoid
Source:
map.scala
override def trySum(as: IterableOnce[Map[K, V]]): 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: Map[K, V]

Attributes

Inherited from:
MapAdditiveMonoid
Source:
map.scala