Fuzzy

com.phasmidsoftware.lascala.values.Fuzzy
See theFuzzy companion object
trait Fuzzy[T] extends () => T, Ordered[Fuzzy[T]]

Typeclass Fuzzy which adds fuzzy behavior to any type.

The method apply() will provide the nominal (i.e. most probable) value

Type parameters

T

the type to which we add the fuzzy behavior

Attributes

Companion
object
Graph
Supertypes
trait Ordered[Fuzzy[T]]
trait Comparable[Fuzzy[T]]
trait () => T
class Object
trait Matchable
class Any
Show all
Known subtypes
trait NumericFuzzy[T]
class BaseNumericFuzzy[T]
class Bounded[T]
class Exact[T]
class Gaussian[T]
Show all

Members list

Value members

Abstract methods

def getP(t: T): Option[Probability]

Abstract method to determine the probability that the nominal value of this Fuzzy object is actually t

Abstract method to determine the probability that the nominal value of this Fuzzy object is actually t

Value parameters

t

the candidate value

Attributes

Returns

the probability (as an Option) that t=apply(). NOTE: that the value of the probability follows the rules described in method p

def isExact: Boolean

Abstract method to determine if this Fuzzy object is exact (i.e. zero fuzziness)

Abstract method to determine if this Fuzzy object is exact (i.e. zero fuzziness)

Attributes

Returns

true if this object is exact, otherwise false

def map[U : Fractional](f: T => U, g: T => U): Fuzzy[U]

Abstract method to map this Fuzzy object into a different Fuzzy object.

Abstract method to map this Fuzzy object into a different Fuzzy object.

Type parameters

U

the underlying type of the result

Value parameters

f

a function T=>U which will be applied to the nominal value of this Fuzzy

g

a function T=>U which will be applied to the fuzzy value of this Fuzzy. NOTE: that the coefficient of delta-T must be positive.

Attributes

Returns

a Fuzzy[U] object

Concrete methods

def p(t: T): Probability

Method to return EITHER the Probability of the nominal value of this Fuzzy being the same as t. OR (if T is continuous Numeric, such as Double) the probability density function at t.

Method to return EITHER the Probability of the nominal value of this Fuzzy being the same as t. OR (if T is continuous Numeric, such as Double) the probability density function at t.

Value parameters

t

the value of t for which we wish to evaluate the probability of it matching the nominal value.

Attributes

Returns

either a finite Probability or the value of the probability density function at t.

Inherited methods

def <(that: Fuzzy[T]): Boolean

Returns true if this is less than that

Returns true if this is less than that

Value parameters

that

the instance to compare against

Attributes

Inherited from:
Ordered
def <=(that: Fuzzy[T]): Boolean

Returns true if this is less than or equal to that.

Returns true if this is less than or equal to that.

Attributes

Inherited from:
Ordered
def >(that: Fuzzy[T]): Boolean

Returns true if this is greater than that.

Returns true if this is greater than that.

Value parameters

that

the instance to compare against

Attributes

Inherited from:
Ordered
def >=(that: Fuzzy[T]): Boolean

Returns true if this is greater than or equal to that.

Returns true if this is greater than or equal to that.

Attributes

Inherited from:
Ordered
def compareTo(that: Fuzzy[T]): Int

Result of comparing this with operand that.

Result of comparing this with operand that.

Value parameters

that

the instance to compare against

Attributes

Inherited from:
Ordered
override def toString(): String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Function0 -> Any
Inherited from:
Function0

Inherited and Abstract methods

def apply(): T

Applies the body of this function to the arguments.

Applies the body of this function to the arguments.

Attributes

Returns

the result of function application.

Inherited from:
Function0
def compare(that: Fuzzy[T]): Int

Result of comparing this with operand that.

Result of comparing this with operand that.

Implement this method to determine how instances of A will be sorted.

Returns x where:

  • x &lt; 0 when this &lt; that

  • x == 0 when this == that

  • x > 0 when this > that

Value parameters

that

the instance to compare against

Attributes

Returns

an integer whose sign indicates the ordering relation between this and that

Inherited from:
Ordered