com.twitter.algebird

Metric

object Metric extends Serializable

A Metric[V] m is a function (V, V) => Double that satisfies the following properties:

1. m(v1, v2) >= 0 2. m(v1, v2) == 0 iff v1 == v2 3. m(v1, v2) == m(v2, v1) 4. m(v1, v3) <= m(v1, v2) + m(v2, v3)

If you implement this trait, make sure that you follow these rules.

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Metric
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
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
  6. def L1Iterable[V](implicit arg0: Monoid[V], arg1: Metric[V]): Metric[Iterable[V]]

  7. def L1Map[K, V](implicit arg0: Monoid[V], arg1: Metric[V]): Metric[Map[K, V]]

  8. def L2Iterable[V](implicit arg0: Monoid[V], arg1: Metric[V]): Metric[Iterable[V]]

  9. def L2Map[K, V](implicit arg0: Monoid[V], arg1: Metric[V]): Metric[Map[K, V]]

  10. def apply[V](v1: V, v2: V)(implicit arg0: Metric[V]): Double

  11. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  12. implicit val boolMetric: Metric[Boolean]

  13. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. implicit val doubleMetric: Metric[Double]

  15. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. implicit val floatMetric: Metric[Float]

  19. def from[V](f: (V, V) ⇒ Double): Metric[V]

  20. final def getClass(): Class[_]

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

    Definition Classes
    AnyRef → Any
  22. implicit val intMetric: Metric[Int]

  23. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  24. implicit def iterableMetric[V](implicit arg0: Monoid[V], arg1: Metric[V]): Metric[Iterable[V]]

  25. implicit val jBoolMetric: Metric[Boolean]

  26. implicit val jDoubleMetric: Metric[Double]

  27. implicit val jFloatMetric: Metric[Float]

  28. implicit val jIntMetric: Metric[Integer]

  29. implicit val jLongMetric: Metric[Long]

  30. implicit val jShortMetric: Metric[Short]

  31. implicit val longMetric: Metric[Long]

  32. implicit def mapMetric[K, V](implicit arg0: Monoid[V], arg1: Metric[V]): Metric[Map[K, V]]

  33. def minkowskiIterable[V](p: Double)(implicit arg0: Monoid[V], arg1: Metric[V]): Metric[Iterable[V]]

  34. def minkowskiMap[K, V](p: Double)(implicit arg0: Monoid[V], arg1: Metric[V]): Metric[Map[K, V]]

  35. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  36. def norm[V](v: V)(implicit arg0: Metric[V], arg1: Monoid[V]): Double

  37. final def notify(): Unit

    Definition Classes
    AnyRef
  38. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  39. implicit val shortMetric: Metric[Short]

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

    Definition Classes
    AnyRef
  41. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped