CounterLike

trait CounterLike[K, V, +M <: Map[K, V], +This <: Counter[K, V]] extends TensorLike[K, V, This] with Serializable

A map-like tensor that acts like a collection of key-value pairs where the set of values may grow arbitrarily.

trait Serializable
trait TensorLike[K, V, This]
trait NumericOps[This]
trait QuasiTensor[K, V]
trait HasOps
class Object
trait Matchable
class Any
trait Counter[K, V]
class Impl[K, V]

Value members

Abstract methods

def data: M
def default: V

Concrete methods

def activeIterator: Iterator[(K, V)]
def activeKeysIterator: Iterator[K]
def activeSize: Int
def activeValuesIterator: Iterator[V]
override def apply(k: K): V
Definition Classes
def contains(k: K): Boolean
override def equals(p1: Any): Boolean
Definition Classes
Any
def get(k: K): Option[V]
override def hashCode(): Int
Definition Classes
def isEmpty: Boolean
override def iterator: Iterator[(K, V)]
Definition Classes
def keySet: Set[K]
override def keysIterator: Iterator[K]
Definition Classes
def repr: This
override def size: Int
Definition Classes
def toMap: Map[K, V]
override def toString: String
Definition Classes
Any
def update(k: K, v: V): Unit
override def valuesIterator: Iterator[V]
Definition Classes

Inherited methods

final def %[B, That](b: B)(implicit op: Impl2[This, B, That]): That

Alias for :%(b) when b is a scalar.

Alias for :%(b) when b is a scalar.

Inherited from
ImmutableNumericOps
final def %:%[B, That](b: B)(implicit op: Impl2[This, B, That]): That

Element-wise modulo of this and b.

Element-wise modulo of this and b.

Inherited from
ImmutableNumericOps
final def %=[B](b: B)(implicit op: InPlaceImpl2[This, B]): This

Alias for :%=(b) when b is a scalar.

Alias for :%=(b) when b is a scalar.

Inherited from
NumericOps
final def &[B, That](b: B)(implicit op: Impl2[This, B, That]): That

Alias for &:&(b) for all b.

Alias for &:&(b) for all b.

Inherited from
ImmutableNumericOps
final def &:&[B, That](b: B)(implicit op: Impl2[This, B, That]): That

Element-wise logical "and" operator -- returns true if corresponding elements are non-zero.

Element-wise logical "and" operator -- returns true if corresponding elements are non-zero.

Inherited from
ImmutableNumericOps
final def &=[B](b: B)(implicit op: InPlaceImpl2[This, B]): This

Mutates this by element-wise and of this and b.

Mutates this by element-wise and of this and b.

Inherited from
NumericOps
final def *[B, That](b: B)(implicit op: Impl2[This, B, That]): That

Matrix multiplication

Matrix multiplication

Inherited from
ImmutableNumericOps
final def *:*[B, That](b: B)(implicit op: Impl2[This, B, That]): That

Element-wise product of this and b.

Element-wise product of this and b.

Inherited from
ImmutableNumericOps
final def *=[B](b: B)(implicit op: InPlaceImpl2[This, B]): This

Alias for :*=(b) when b is a scalar.

Alias for :*=(b) when b is a scalar.

Inherited from
NumericOps
final def +[B, C, That](b: B)(implicit op: Impl2[This, B, That]): That

Alias for :+(b) for all b.

Alias for :+(b) for all b.

Inherited from
NumericOps
final def +:+[B, That](b: B)(implicit op: Impl2[This, B, That]): That

Element-wise sum of this and b.

Element-wise sum of this and b.

Inherited from
ImmutableNumericOps
final def +=[B](b: B)(implicit op: InPlaceImpl2[This, B]): This

Alias for :+=(b) for all b.

Alias for :+=(b) for all b.

Inherited from
NumericOps
final def -[B, That](b: B)(implicit op: Impl2[This, B, That]): That

Alias for -:-(b) for all b.

Alias for -:-(b) for all b.

Inherited from
ImmutableNumericOps
final def -:-[B, That](b: B)(implicit op: Impl2[This, B, That]): That

Element-wise difference of this and b.

Element-wise difference of this and b.

Inherited from
ImmutableNumericOps
final def -=[B](b: B)(implicit op: InPlaceImpl2[This, B]): This

Alias for :-=(b) for all b.

Alias for :-=(b) for all b.

Inherited from
NumericOps
final def /[B, That](b: B)(implicit op: Impl2[This, B, That]): That

Alias for :/(b) when b is a scalar.

Alias for :/(b) when b is a scalar.

Inherited from
ImmutableNumericOps
final def /:/[B, That](b: B)(implicit op: Impl2[This, B, That]): That

Element-wise quotient of this and b.

Element-wise quotient of this and b.

Inherited from
ImmutableNumericOps
final def /=[B](b: B)(implicit op: InPlaceImpl2[This, B]): This

Alias for :/=(b) when b is a scalar.

Alias for :/=(b) when b is a scalar.

Inherited from
NumericOps
final def :!=[B, That](b: B)(implicit op: Impl2[This, B, That]): That

Element-wise inequality comparator of this and b.

Element-wise inequality comparator of this and b.

Inherited from
ImmutableNumericOps
final def :%=[B](b: B)(implicit op: InPlaceImpl2[This, B]): This

Mutates this by element-wise modulo of b into this.

Mutates this by element-wise modulo of b into this.

Inherited from
NumericOps
final def :&=[B](b: B)(implicit op: InPlaceImpl2[This, B]): This

Mutates this by element-wise and of this and b.

Mutates this by element-wise and of this and b.

Inherited from
NumericOps
final def :*=[B](b: B)(implicit op: InPlaceImpl2[This, B]): This

Mutates this by element-wise multiplication of b into this.

Mutates this by element-wise multiplication of b into this.

Inherited from
NumericOps
final def :+=[B](b: B)(implicit op: InPlaceImpl2[This, B]): This

Mutates this by element-wise addition of b into this.

Mutates this by element-wise addition of b into this.

Inherited from
NumericOps
final def :-=[B](b: B)(implicit op: InPlaceImpl2[This, B]): This

Mutates this by element-wise subtraction of b from this

Mutates this by element-wise subtraction of b from this

Inherited from
NumericOps
final def :/=[B](b: B)(implicit op: InPlaceImpl2[This, B]): This

Mutates this by element-wise division of b into this

Mutates this by element-wise division of b into this

Inherited from
NumericOps
final def :=[B](b: B)(implicit op: InPlaceImpl2[This, B]): This

Mutates this by element-wise assignment of b into this.

Mutates this by element-wise assignment of b into this.

Inherited from
NumericOps
final def :==[B, That](b: B)(implicit op: Impl2[This, B, That]): That

Element-wise equality comparator of this and b.

Element-wise equality comparator of this and b.

Inherited from
ImmutableNumericOps
final def :^=[B](b: B)(implicit op: InPlaceImpl2[This, B]): This

Mutates this by element-wise exponentiation of this by b.

Mutates this by element-wise exponentiation of this by b.

Inherited from
NumericOps
final def :^^=[B](b: B)(implicit op: InPlaceImpl2[This, B]): This

Mutates this by element-wise xor of this and b.

Mutates this by element-wise xor of this and b.

Inherited from
NumericOps
final def :|=[B](b: B)(implicit op: InPlaceImpl2[This, B]): This

Mutates this by element-wise or of this and b.

Mutates this by element-wise or of this and b.

Inherited from
NumericOps
final def <:<[B, That](b: B)(implicit op: Impl2[This, B, That]): That

Element-wise less=than comparator of this and b.

Element-wise less=than comparator of this and b.

Inherited from
NumericOps
final def <:=[B, That](b: B)(implicit op: Impl2[This, B, That]): That

Element-wise less-than-or-equal-to comparator of this and b.

Element-wise less-than-or-equal-to comparator of this and b.

Inherited from
NumericOps
final def >:=[B, That](b: B)(implicit op: Impl2[This, B, That]): That

Element-wise greater-than-or-equal-to comparator of this and b.

Element-wise greater-than-or-equal-to comparator of this and b.

Inherited from
NumericOps
final def >:>[B, That](b: B)(implicit op: Impl2[This, B, That]): That

Element-wise greater-than comparator of this and b.

Element-wise greater-than comparator of this and b.

Inherited from
NumericOps
def \[B, That](b: B)(implicit op: Impl2[This, B, That]): That

Shaped solve of this by b.

Shaped solve of this by b.

Inherited from
ImmutableNumericOps
final def ^:^[B, That](b: B)(implicit op: Impl2[This, B, That]): That

Element-wise exponentiation of this and b.

Element-wise exponentiation of this and b.

Inherited from
ImmutableNumericOps
final def ^^[B, That](b: B)(implicit op: Impl2[This, B, That]): That

Alias for :^^(b) for all b.

Alias for :^^(b) for all b.

Inherited from
ImmutableNumericOps
final def ^^:^^[B, That](b: B)(implicit op: Impl2[This, B, That]): That

Element-wise logical "xor" operator -- returns true if only one of the corresponding elements is non-zero.

Element-wise logical "xor" operator -- returns true if only one of the corresponding elements is non-zero.

Inherited from
ImmutableNumericOps
final def ^^=[B](b: B)(implicit op: InPlaceImpl2[This, B]): This

Mutates this by element-wise xor of this and b.

Mutates this by element-wise xor of this and b.

Inherited from
NumericOps
def active: TensorActive[K, V, This]
Inherited from
TensorLike
def apply[Slice1, Slice2, Result](slice1: Slice1, slice2: Slice2)(implicit canSlice: CanSlice2[This, Slice1, Slice2, Result]): Result

Method for slicing that is tuned for Matrices.

Method for slicing that is tuned for Matrices.

Inherited from
TensorLike
def apply[Result](a: K, b: K, c: K, slice: K*)(implicit canSlice: CanSlice[This, Seq[K], Result]): Result

Slice a sequence of elements. Must be at least 2.

Slice a sequence of elements. Must be at least 2.

Inherited from
TensorLike
def apply[Slice, Result](slice: Slice)(implicit canSlice: CanSlice[This, Slice, Result]): Result

method for slicing a tensor. For instance, DenseVectors support efficient slicing by a Range object.

method for slicing a tensor. For instance, DenseVectors support efficient slicing by a Range object.

Inherited from
TensorLike
final def dot[B, BB >: B, That](b: B)(implicit op: Impl2[This, BB, That]): That

Inner product of this and b.

Inner product of this and b.

Inherited from
ImmutableNumericOps
def findAll(f: V => Boolean): IndexedSeq[K]

Returns all indices k whose value satisfies a predicate.

Returns all indices k whose value satisfies a predicate.

Inherited from
QuasiTensor
def forall(fn: V => Boolean): Boolean

Returns true if and only if the given predicate is true for all elements.

Returns true if and only if the given predicate is true for all elements.

Inherited from
TensorLike
def forall(fn: (K, V) => Boolean): Boolean

Returns true if and only if the given predicate is true for all elements.

Returns true if and only if the given predicate is true for all elements.

Inherited from
TensorLike
def foreachKey[U](fn: K => U): Unit

Applies the given function to each key in the tensor.

Applies the given function to each key in the tensor.

Inherited from
TensorLike
def foreachPair[U](fn: (K, V) => U): Unit

Applies the given function to each key and its corresponding value.

Applies the given function to each key and its corresponding value.

Inherited from
TensorLike
def foreachValue[U](fn: V => U): Unit

Applies the given function to each value in the map (one for each element of the domain, including zeros).

Applies the given function to each value in the map (one for each element of the domain, including zeros).

Inherited from
TensorLike
def keys: TensorKeys[K, V, This]
Inherited from
TensorLike
def mapActivePairs[O, That](f: (K, V) => O)(implicit bf: CanMapKeyValuePairs[This, K, V, O, That]): That

Maps all active key-value pairs values.

Maps all active key-value pairs values.

Inherited from
TensorLike
def mapActiveValues[O, That](f: V => O)(implicit bf: CanMapValues[This, V, O, That]): That

Maps all non-zero values.

Maps all non-zero values.

Inherited from
TensorLike
def mapPairs[O, That](f: (K, V) => O)(implicit bf: CanMapKeyValuePairs[This, K, V, O, That]): That

Creates a new map containing a transformed copy of this map.

Creates a new map containing a transformed copy of this map.

Inherited from
TensorLike
def mapValues[O, That](f: V => O)(implicit bf: CanMapValues[This, V, O, That]): That

Creates a new map containing a transformed copy of this map.

Creates a new map containing a transformed copy of this map.

Inherited from
TensorLike
def pairs: TensorPairs[K, V, This]
Inherited from
TensorLike
final def t[That, Slice1, Result](a: Slice1)(implicit op: CanTranspose[This, That], canSlice: CanSlice[That, Slice1, Result]): Result

A transposed view of this object, followed by a slice. Sadly frequently necessary.

A transposed view of this object, followed by a slice. Sadly frequently necessary.

Inherited from
ImmutableNumericOps
final def t[That, Slice1, Slice2, Result](a: Slice1, b: Slice2)(implicit op: CanTranspose[This, That], canSlice: CanSlice2[That, Slice1, Slice2, Result]): Result

A transposed view of this object, followed by a slice. Sadly frequently necessary.

A transposed view of this object, followed by a slice. Sadly frequently necessary.

Inherited from
ImmutableNumericOps
final def t[That](implicit op: CanTranspose[This, That]): That

A transposed view of this object.

A transposed view of this object.

Inherited from
ImmutableNumericOps
final def unary_![That](implicit op: Impl[This, That]): That
Inherited from
ImmutableNumericOps
final def unary_-[That](implicit op: Impl[This, That]): That
Inherited from
ImmutableNumericOps
def values: TensorValues[K, V, This]
Inherited from
TensorLike
final def |[B, That](b: B)(implicit op: Impl2[This, B, That]): That

Alias for :||(b) for all b.

Alias for :||(b) for all b.

Inherited from
ImmutableNumericOps
final def |:|[B, That](b: B)(implicit op: Impl2[This, B, That]): That

Element-wise logical "or" operator -- returns true if either element is non-zero.

Element-wise logical "or" operator -- returns true if either element is non-zero.

Inherited from
ImmutableNumericOps
final def |=[B](b: B)(implicit op: InPlaceImpl2[This, B]): This

Mutates this by element-wise or of this and b.

Mutates this by element-wise or of this and b.

Inherited from
NumericOps