Fuzzy

com.phasmidsoftware.number.core.misc.Fuzzy
See theFuzzy companion object
sealed trait Fuzzy

The Fuzzy trait defines a quantity for which there is doubt about its actual value. This Fuzzy trait is Numeric (it extends Fractional), and thus Fuzzy values can be ordered, compared, and take part in arithmetic operations, including division.

In this implementation of Fuzzy, the actual value is represented by a Double (see the get method).

In general, a Fuzzy trait would only require ordering.

Numeric fuzzy objects define a probability distribution such that it is possible to determine the likelihood that the actual value of the fuzzy object is between two limits. Typical distributions are Gaussian (i.e. "Normal") and Box (i.e. a truncated Uniform distribution). Additionally, we support Trapezoid shape. Other distributions are possible, of course, especially when Gaussian fuzzy objects are combined with other fuzzy objects. This package does not properly handle these situations.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class FuzzyBase
class Bounded
class Exact
class Gaussian

Members list

Value members

Abstract methods

def fuzz: Double

Attributes

Returns

some measure of this Fuzzy object's fuzziness (actual domain depends on the type of Fuzzy)

def get: Double

Attributes

Returns

the nominal value of this Fuzzy object

def getRealDistribution: RealDistribution

Attributes

Returns

the underlying @link{RealDistribution} of this Fuzzy object

def map(f: DiFunc[Double]): Fuzzy

Method to map this Fuzzy object with a 1-arity DiFunc

Method to map this Fuzzy object with a 1-arity DiFunc

Value parameters

f

the function to apply

Attributes

Returns

the result

def map2(f: DiFunc[Double])(delta: Double): Fuzzy

Method to map this Fuzzy object with a 2-arity DiFunc

Method to map this Fuzzy object with a 2-arity DiFunc

Value parameters

delta

the fuzziness of the second parameter

f

the function to apply

Attributes

Returns

the result

def power(x: Fuzzy): Fuzzy
def prob(x: Double, delta: Double): Try[Double]

Invokes the probability function of the @link{AbstractRealDistribution} but the parameters are slightly different.

Invokes the probability function of the @link{AbstractRealDistribution} but the parameters are slightly different.

Value parameters

delta

the delta on either side which will determine the limits

x

the value at which we want to measure the probability

Attributes

Returns

the probability that x-delta

Concrete methods

def compare(x: Fuzzy, y: Fuzzy): Int

Returns an integer whose sign communicates how x compares to y.

Returns an integer whose sign communicates how x compares to y.

The result sign has the following meaning:

  • negative if x < y
  • positive if x > y
  • 0 otherwise (if x == y or, for whatever reason, x cannot be distinguished from y)

Attributes