Attributes
Members list
Value members
Concrete methods
Retrieves the implicit FuzzyEq instance for the type A.
Retrieves the implicit FuzzyEq instance for the type A.
Value parameters
- fe
-
The implicit
FuzzyEqinstance for the typeA.
Attributes
- Returns
-
The
FuzzyEqinstance for the typeA.
Creates a new FuzzyEq instance for the type A using the provided comparison function.
Creates a new FuzzyEq instance for the type A using the provided comparison function.
Value parameters
- f
-
A function that defines the fuzzy equality logic for values of type
A. The function takes two values of typeAand a probability threshold of typeDouble, returningtrueif the values are considered approximately equal within the given threshold, otherwisefalse.
Attributes
- Returns
-
A
FuzzyEq[A]instance that uses the provided function for fuzzy equality checks.
Extensions
Extensions
Compares the current value with another value using fuzzy equality logic. The comparison allows for an approximate equality check with a specified probability threshold.
Compares the current value with another value using fuzzy equality logic. The comparison allows for an approximate equality check with a specified probability threshold.
Value parameters
- p
-
The probability threshold for determining approximate equality. Defaults to 0.5. A higher value makes the comparison stricter, while a lower value allows more flexibility.
- y
-
The value of type
Ato compare with the current value.
Attributes
- Returns
-
trueif the values are considered approximately equal within the specified threshold, otherwisefalse.
Compares the current value with another value using fuzzy equality logic. The comparison allows for an approximate equality check with a default probability threshold.
Compares the current value with another value using fuzzy equality logic. The comparison allows for an approximate equality check with a default probability threshold.
Value parameters
- y
-
The value of type
Ato compare with the current value.
Attributes
- Returns
-
trueif the values are considered approximately equal within the default threshold, otherwisefalse.
Compares the current value with another value using fuzzy equality logic. The comparison allows for an approximate equality check with a specified probability threshold.
Compares the current value with another value using fuzzy equality logic. The comparison allows for an approximate equality check with a specified probability threshold.
Value parameters
- p
-
The probability threshold for determining approximate equality. A higher value makes the comparison stricter, while a lower value allows more flexibility.
- y
-
The value of type
Ato compare with the current value.
Attributes
- Returns
-
trueif the values are considered approximately equal within the specified threshold, otherwisefalse.