# Counter2Ops

#### trait Counter2Ops extends AnyRef

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
1. Alphabetic
2. By inheritance
Inherited
1. Counter2Ops
2. AnyRef
3. Any
1. Hide All
2. Show all
Visibility
1. Public
2. All

### Value Members

1. #### final def !=(arg0: AnyRef): Boolean

Definition Classes
AnyRef
2. #### final def !=(arg0: Any): Boolean

Definition Classes
Any
3. #### final def ##(): Int

Definition Classes
AnyRef → Any
4. #### final def ==(arg0: AnyRef): Boolean

Definition Classes
AnyRef
5. #### final def ==(arg0: Any): Boolean

Definition Classes
Any

10. #### final def asInstanceOf[T0]: T0

Definition Classes
Any

23. #### implicit def canMultiplyC2C1[K1, K2, V](implicit semiring: Semiring[V], d: DefaultArrayValue[V]): OpMulMatrix.Impl2[Counter2[K1, K2, V], Counter[K2, V], Counter[K1, V]]

Returns the k-norm of this Vector.

Returns the k-norm of this Vector. implicit def canNorm[K1, K2, V:Ring]:CanNorm[Counter2[K1, K2, V]] = new CanNorm[Counter2[K1, K2, V]] { val field = implicitly[Ring[V]] def apply(c: Counter2[K1, K2, V], n: Double): Double = { import c._

if (n == 1) { var sum = 0.0 activeValuesIterator foreach (v => sum += field.norm(v)) sum } else if (n == 2) { var sum = 0.0 activeValuesIterator foreach (v => { val nn = field.norm(v); sum += nn * nn }) math.sqrt(sum) } else if (n == Double.PositiveInfinity) { var max = Double.NegativeInfinity activeValuesIterator foreach (v => { val nn = field.norm(v); if (nn > max) max = nn }) max } else { var sum = 0.0 activeValuesIterator foreach (v => { val nn = field.norm(v); sum += math.pow(nn,n) }) math.pow(sum, 1.0 / n) } } }

28. #### def clone(): AnyRef

Attributes
protected[java.lang]
Definition Classes
AnyRef
Annotations
@throws( ... )
29. #### final def eq(arg0: AnyRef): Boolean

Definition Classes
AnyRef
30. #### def equals(arg0: Any): Boolean

Definition Classes
AnyRef → Any
31. #### def finalize(): Unit

Attributes
protected[java.lang]
Definition Classes
AnyRef
Annotations
@throws( classOf[java.lang.Throwable] )
32. #### final def getClass(): Class[_]

Definition Classes
AnyRef → Any
33. #### def hashCode(): Int

Definition Classes
AnyRef → Any
34. #### final def isInstanceOf[T0]: Boolean

Definition Classes
Any
35. #### final def ne(arg0: AnyRef): Boolean

Definition Classes
AnyRef
36. #### final def notify(): Unit

Definition Classes
AnyRef
37. #### final def notifyAll(): Unit

Definition Classes
AnyRef

42. #### final def synchronized[T0](arg0: ⇒ T0): T0

Definition Classes
AnyRef
43. #### def toString(): String

Definition Classes
AnyRef → Any
44. #### final def wait(): Unit

Definition Classes
AnyRef
Annotations
@throws( ... )
45. #### final def wait(arg0: Long, arg1: Int): Unit

Definition Classes
AnyRef
Annotations
@throws( ... )
46. #### final def wait(arg0: Long): Unit

Definition Classes
AnyRef
Annotations
@throws( ... )