FuzzyBase

com.phasmidsoftware.number.core.misc.FuzzyBase
abstract class FuzzyBase(nominal: Double, delta: Double, distribution: AbstractRealDistribution) extends Fuzzy

Base class for the implementation of Fuzzy objects

Attributes

Graph
Supertypes
trait Fuzzy
class Object
trait Matchable
class Any
Known subtypes
class Bounded
class Exact
class Gaussian

Members list

Type members

Types

type PairFunction = (Double, Double) => Double

Value members

Abstract methods

def combine(o: Fuzzy, f: PairFunction, df_dx: PairFunction, df_dy: PairFunction): Fuzzy

Value parameters

df_dx

the derivative of f with respect to x.

df_dy

the derivative of f with respect to y.

f

a function(x,y) which

o

another Fuzzy which is to be added to this Fuzzy

Attributes

Returns

a new Fuzzy composed from this and o

def newFuzzy(x: Double, delta: Double): Fuzzy

Concrete methods

def *(that: Fuzzy): Fuzzy
def *(that: Long): Fuzzy
def +(that: Fuzzy): Fuzzy
def +(that: Long): Fuzzy
def -(that: Fuzzy): Fuzzy
def -(that: Long): Fuzzy
def /(that: Fuzzy): Fuzzy
def /(that: Long): Fuzzy
def div(x: Fuzzy, y: Fuzzy): Fuzzy
def fromInt(x: Int): Exact
def inverseCumulativeProbability(p: Double): Try[Double]
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])(delta2: 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 minus(x: Fuzzy, y: Fuzzy): Fuzzy
def negate(x: Fuzzy): Fuzzy
def plus(x: Fuzzy, y: Fuzzy): Fuzzy
def power(x: Int): Fuzzy
def power(x: Double): Fuzzy
def power(x: Fuzzy): Fuzzy
def powerExact(x: Fuzzy, y: Int): Fuzzy
def prob(y: 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

def times(x: Fuzzy, y: Fuzzy): Fuzzy
def toDouble(x: Fuzzy): Double
def toFloat(x: Fuzzy): Float
def toInt(x: Fuzzy): Int
def toLong(x: Fuzzy): Long
def ∧(that: Int): Fuzzy

Inherited 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

Inherited from:
Fuzzy

Concrete fields

lazy val fuzz: Double

Attributes

Returns

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

lazy val get: Double

Attributes

Returns

the nominal value of this Fuzzy object

lazy val getRealDistribution: RealDistribution

Attributes

Returns

the underlying @link{RealDistribution} of this Fuzzy object

lazy val negate: Fuzzy