A trait for representing equivalence relations.
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:
reflexive:
equiv(x, x) == true
for any x of typeT
.symmetric:
equiv(x, y) == equiv(y, x)
for anyx
andy
of typeT
.transitive: if
equiv(x, y) == true
andequiv(y, z) == true
, thenequiv(x, z) == true
for anyx
,y
, andz
of typeT
.
- Companion
- object
trait Serializable
class Any
object Unit
object Boolean
object Byte
object Char
object Short
object Int
object Long
trait StrictEquiv
object StrictEquiv
object DeprecatedFloatEquiv
trait IeeeEquiv
object IeeeEquiv
trait StrictEquiv
object StrictEquiv
object DeprecatedDoubleEquiv
trait IeeeEquiv
object IeeeEquiv
object BigInt
object BigDecimal
object String
object Symbol
trait PartialOrdering[T]
trait Fractional[T]
trait FloatIsFractional
object FloatIsFractional
trait DoubleIsFractional
object DoubleIsFractional
trait BigDecimalIsFractional
object BigDecimalIsFractional
trait BigIntIsIntegral
object BigIntIsIntegral
trait IntIsIntegral
object IntIsIntegral
trait ShortIsIntegral
object ShortIsIntegral
trait ByteIsIntegral
object ByteIsIntegral
trait CharIsIntegral
object CharIsIntegral
trait LongIsIntegral
object LongIsIntegral
trait BigDecimalAsIfIntegral
object BigDecimalAsIfIntegral
trait BigDecimalIsConflicted
trait CachedReverse[T]
object Int
trait UnitOrdering
object Unit
trait BooleanOrdering
object Boolean
trait ByteOrdering
object Byte
trait CharOrdering
object Char
trait ShortOrdering
object Short
trait IntOrdering
trait LongOrdering
object Long
trait TotalOrdering
object TotalOrdering
object DeprecatedFloatOrdering
trait IeeeOrdering
object IeeeOrdering
trait TotalOrdering
object TotalOrdering
object DeprecatedDoubleOrdering
trait IeeeOrdering
object IeeeOrdering
trait BigIntOrdering
object BigInt
trait BigDecimalOrdering
object BigDecimal
trait StringOrdering
object String
trait SymbolOrdering
object Symbol
trait OptionOrdering[T]