scala.math

Equiv

trait Equiv [T] extends AnyRef

A trait for representing equivalence relations. It is important to distinguish between a type that can be compared for equality or equivalence and a representation of equivalence on some type. This trait is for representing the latter.

An equivalence relation is a binary relation on a type. This relation is exposed as the equiv method of the Equiv trait. The relation must be:

  1. reflexive: equiv(x, x) == true for any x of type T. 2. symmetric: equiv(x, y) == equiv(y, x) for any x and y of type T. 3. transitive: if equiv(x, y) == true and equiv(y, z) == true, then equiv(x, z) == true for any x, y, and z of type T.
Source
Equiv.scala
Version

1.0, 2008-04-03

Since

2.7

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

Abstract Value Members

  1. def equiv (x: T, y: T): Boolean

    Returns true iff x is equivalent to y.

    Returns true iff x is equivalent to y.

    Attributes
    abstract