Counter

object Counter extends CounterOps
Companion:
class
class Object
trait Matchable
class Any
Counter.type

Type members

Classlikes

@SerialVersionUID(2872445575657408160L)
class Impl[K, V](val data: Map[K, V])(implicit zero: Zero[V]) extends Counter[K, V]

Inherited classlikes

class CanZipMapKeyValuesCounter[K, V, RV] extends CanZipMapKeyValues[Counter[K, V], K, V, RV, Counter[K, RV]]
Inherited from:
CounterOps
class CanZipMapValuesCounter[K, V, RV] extends CanZipMapValues[Counter[K, V], V, RV, Counter[K, RV]]
Inherited from:
CounterOps

Value members

Concrete methods

def apply[K, V : Zero](): Counter[K, V]

Returns an empty counter.

Returns an empty counter.

def apply[K, V : Semiring](values: (K, V)*): Counter[K, V]

Returns a counter by summing all the given values.

Returns a counter by summing all the given values.

def apply[K, V : Semiring](values: IterableOnce[(K, V)]): Counter[K, V]

Returns a counter by summing all the given values.

Returns a counter by summing all the given values.

def count[K](items: K*): Counter[K, Int]
def countTraversable[K](items: IterableOnce[K]): Counter[K, Int]

Counts each of the given items.

Counts each of the given items.

Inherited methods

def binaryOpFromBinaryUpdateOp[K, V, Other, Op <: OpType](implicit copy: CanCopy[Counter[K, V]], op: InPlaceImpl2[Op, Counter[K, V], Other]): UImpl2[Op, Counter[K, V], Other, Counter[K, V]]
Inherited from:
CounterOps

Implicits

Implicits

implicit def canCreateZeros[K, V : Semiring]: CanCreateZeros[Counter[K, V], K]
implicit def canCreateZerosLike[K, V : Semiring]: CanCreateZerosLike[Counter[K, V], Counter[K, V]]
implicit def canIterateValues[K, V]: CanTraverseValues[Counter[K, V], V]
implicit def canMapValues[K, V, RV : Zero]: CanMapValues[Counter[K, V], V, RV, Counter[K, RV]]
implicit def normImplDouble[K, V : Field]: Impl2[Counter[K, V], Double, Double]
implicit def scalarOf[K, V]: ScalarOf[Counter[K, V], V]
implicit def space[K, V](implicit field: Field[V]): MutableEnumeratedCoordinateField[Counter[K, V], K, V]

Inherited implicits

implicit def addIntoVS[K1, V : Semiring]: InPlaceImpl2[Counter[K1, V], V]
Inherited from:
CounterOps
implicit def addIntoVV[K1, V : Semiring]: InPlaceImpl2[Counter[K1, V], Counter[K1, V]]
Inherited from:
CounterOps
implicit def addVS[K1, V : Zero]: Impl2[Counter[K1, V], V, Counter[K1, V]]
Inherited from:
CounterOps
implicit def addVV[K1, V : Zero]: Impl2[Counter[K1, V], Counter[K1, V], Counter[K1, V]]
Inherited from:
CounterOps
implicit def canAxpy[K1, V : Semiring]: InPlaceImpl3[Counter[K1, V], V, Counter[K1, V]]
Inherited from:
CounterOps
implicit def canCopy[K1, V : Semiring]: CanCopy[Counter[K1, V]]
Inherited from:
CounterOps
implicit def canDivIntoVS[K1, V : Field]: InPlaceImpl2[Counter[K1, V], V]
Inherited from:
CounterOps
implicit def canDivIntoVV[K1, V : Field]: InPlaceImpl2[Counter[K1, V], Counter[K1, V]]
Inherited from:
CounterOps
implicit def canDivVS[K1, V](implicit copy: CanCopy[Counter[K1, V]], semiring: Field[V]): Impl2[Counter[K1, V], V, Counter[K1, V]]
Inherited from:
CounterOps
implicit def canDivVV[K1, V](implicit copy: CanCopy[Counter[K1, V]], semiring: Field[V]): Impl2[Counter[K1, V], Counter[K1, V], Counter[K1, V]]
Inherited from:
CounterOps
implicit def canMulInner[K1, V](implicit copy: CanCopy[Counter[K1, V]], semiring: Semiring[V]): Impl2[Counter[K1, V], Counter[K1, V], V]
Inherited from:
CounterOps
implicit def canMulIntoVS[K2, K1 <: K2, V : Semiring]: InPlaceImpl2[Counter[K1, V], V]
Inherited from:
CounterOps
implicit def canMulIntoVS_M[K2, K1 <: K2, V : Semiring]: InPlaceImpl2[Counter[K1, V], V]
Inherited from:
CounterOps
implicit def canMulIntoVV[K2, K1 <: K2, V : Semiring]: InPlaceImpl2[Counter[K1, V], Counter[K2, V]]
Inherited from:
CounterOps
implicit def canMulVS[K2, K1 <: K2, V](implicit semiring: Semiring[V]): Impl2[Counter[K1, V], V, Counter[K1, V]]
Inherited from:
CounterOps
implicit def canMulVS_M[K2, K1 <: K2, V](implicit semiring: Semiring[V]): Impl2[Counter[K1, V], V, Counter[K1, V]]
Inherited from:
CounterOps
implicit def canMulVV[K1, V](implicit semiring: Semiring[V]): Impl2[Counter[K1, V], Counter[K1, V], Counter[K1, V]]
Inherited from:
CounterOps
implicit def canNegate[K1, V](implicit ring: Ring[V]): Impl[Counter[K1, V], Counter[K1, V]]
Inherited from:
CounterOps
implicit def canNorm[K, V](implicit normImpl: Impl[V, Double]): Impl2[Counter[K, V], Double, Double]
Inherited from:
CounterOps
implicit def canSetIntoVS[K1, V]: InPlaceImpl2[Counter[K1, V], V]
Inherited from:
CounterOps
implicit def canTransformValues[L, V]: CanTransformValues[Counter[L, V], V]
Inherited from:
CounterOps
implicit def canTraverseValues[L, V]: CanTraverseValues[Counter[L, V], V]
Inherited from:
CounterOps
implicit def impl_OpSet_InPlace_C_C[K1, K2 <: K1, V]: InPlaceImpl2[Counter[K1, V], Counter[K2, V]]
Inherited from:
CounterOps
implicit def subIntoVS[K1, V : Ring]: InPlaceImpl2[Counter[K1, V], V]
Inherited from:
CounterOps
implicit def subIntoVV[K1, V : Ring]: InPlaceImpl2[Counter[K1, V], Counter[K1, V]]
Inherited from:
CounterOps
implicit def subVS[K1, V : Zero]: Impl2[Counter[K1, V], V, Counter[K1, V]]
Inherited from:
CounterOps
implicit def subVV[K1, V : Zero]: Impl2[Counter[K1, V], Counter[K1, V], Counter[K1, V]]
Inherited from:
CounterOps
implicit def zipMap[K, V, R : Semiring]: CanZipMapValuesCounter[K, V, R]
Inherited from:
CounterOps
implicit def zipMapKeyValues[K, V, R : Semiring]: CanZipMapKeyValuesCounter[K, V, R]
Inherited from:
CounterOps