Absolute Fuzziness.
Type parameters
- T
-
the underlying type of the fuzziness. Usually Double for fuzzy numerics.
Value parameters
- magnitude
-
the magnitude of the fuzz.
- shape
-
the shape of the fuzz.
Attributes
Members list
Value members
Concrete methods
Convolves the current instance of Fuzziness[T] with another Fuzziness[T] instance based on the specified parameters, producing a new Fuzziness[T] instance. The behavior of the convolution depends on the shape and magnitude of the Fuzziness[T] instances involved.
Convolves the current instance of Fuzziness[T] with another Fuzziness[T] instance based on the specified parameters, producing a new Fuzziness[T] instance. The behavior of the convolution depends on the shape and magnitude of the Fuzziness[T] instances involved.
Value parameters
- convolute
-
The
Fuzziness[T]instance to convolve with the current instance. - independent
-
A boolean indicating whether the two fuzzy distributions are independent.
Attributes
- Returns
-
A new
Fuzziness[T]instance as the result of the convolution operation. - Throws
-
FuzzyNumberException
If the operation involves incompatible styles of fuzzy distributions.
Method to render this Fuzziness according to the nominal value t. NOTE that we are actually embedding the fuzziness into the nominal value and returning that.
Method to render this Fuzziness according to the nominal value t. NOTE that we are actually embedding the fuzziness into the nominal value and returning that.
CONSIDER cleaning this method up a bit.
Value parameters
- forceScientific
-
if true, always use scientific notation regardless of value magnitude.
- t
-
a T value.
Attributes
- Returns
-
a tuple of a Boolean (indicating if the value is embedded in the result) and a String which is the textual rendering of t with this Fuzziness applied.
Return either a RelativeFuzz equivalent or this, according to relativeStyle.
Return either a RelativeFuzz equivalent or this, according to relativeStyle.
Value parameters
- relativeStyle
-
if true then convert to Absolute otherwise wrap this in Some().
- t
-
the magnitude of the relevant Number.
Attributes
- Returns
-
the (optional) Fuzziness as a Relative or Absolute Fuzziness, according to relative.
This method takes a value of T on which to base a relative fuzz value. NOTE: if t is zero, we will return None, which means the conversion to relative form failed. The caller should keep the original absolute fuzz rather than treating this as an exact number.
This method takes a value of T on which to base a relative fuzz value. NOTE: if t is zero, we will return None, which means the conversion to relative form failed. The caller should keep the original absolute fuzz rather than treating this as an exact number.
Value parameters
- t
-
the nominal value of the fuzzy number.
Attributes
- Returns
-
an optional RelativeFuzz[T]
Method to do accurate rounding of Double.
Method to do accurate rounding of Double.
Value parameters
- n
-
the number of places to be rounded to.
- x
-
the double value to be rounded.
Attributes
- Returns
-
the rounded value of x.
Computes a threshold confidence value for the given input x based on a normalized Gaussian distribution.
Computes a threshold confidence value for the given input x based on a normalized Gaussian distribution.
The calculation is implemented by asserting the shape is Gaussian, then using normalizeShape.shape to determine the threshold confidence value while factoring in the magnitude as a scale parameter. This method leverages the thresholdConfidence implementation specific to the Gaussian shape.
Value parameters
- x
-
the input value for which the threshold confidence is to be calculated; must be a non-negative value.
Attributes
- Returns
-
the threshold confidence as a
Doublevalue, derived from the inputxand the magnitude of the instance. The returned value represents the confidence level corresponding to the specific threshold.
Transform this Fuzziness[T] according to func. Typically, func will be the derivative of the relevant Number function.
Transform this Fuzziness[T] according to func. Typically, func will be the derivative of the relevant Number function.
Value parameters
- func
-
the function to apply to this Fuzziness[T].
Attributes
- Returns
-
an (optional) transformed version of Fuzziness[T].
Determine the range +- t such that the probability of a random point being within that range is p, and where magnitude signifies the extent of the PDF. In other words get the wiggle room. NOTE that the greater the value of p, the smaller the result
Determine the range +- t such that the probability of a random point being within that range is p, and where magnitude signifies the extent of the PDF. In other words get the wiggle room. NOTE that the greater the value of p, the smaller the result
Attributes
Inherited methods
Creates a Fuzziness instance with an absolute fuzz value of zero, using a Gaussian distribution. This can be used to represent the absence of fuzziness or uncertainty in a value.
Creates a Fuzziness instance with an absolute fuzz value of zero, using a Gaussian distribution. This can be used to represent the absence of fuzziness or uncertainty in a value.
Attributes
- Returns
-
a Fuzziness[U] instance with zero fuzziness and Gaussian shape.
- Inherited from:
- Fuzziness
Computes the probability that random points will be found with the range -x to +x where l is a measure of the magnitude of this Fuzziness. TODO change the types of l and x to be T
Computes the probability that random points will be found with the range -x to +x where l is a measure of the magnitude of this Fuzziness. TODO change the types of l and x to be T
Value parameters
- l
-
the size or scale of the probability density function (e.g., standard deviation for a Gaussian distribution).
- x
-
the specific point that bounds the region we're interested in.
Attributes
- Returns
-
the calculated probability density at the given point.
- Inherited from:
- Fuzziness
Returns the probability that a number with this fuzz and nominal value x is actually zero, i.e. the probability mass at or beyond |x| from the center.
Returns the probability that a number with this fuzz and nominal value x is actually zero, i.e. the probability mass at or beyond |x| from the center.
Value parameters
- x
-
the nominal (absolute) value of the number
Attributes
- Returns
-
probability in [0, 1], where 1.0 means x is certainly zero and 0.0 means x is certainly non-zero
- Inherited from:
- Fuzziness
An iterator over the names of all the elements of this product.
An iterator over the names of all the elements of this product.
Attributes
- Inherited from:
- Product
An iterator over all the elements of this product.
An iterator over all the elements of this product.
Attributes
- Returns
-
in the default implementation, an
Iterator[Any] - Inherited from:
- Product
Creates a fuzziness value using the given input magnitude and applies a Gaussian distribution. This is intended for the situation where we evaluate a series of terms until the remaining terms are smaller than some threshold (the magnitude). CONSIDER in general, we may want to apply a safety factor of 2 or 3 here.
Creates a fuzziness value using the given input magnitude and applies a Gaussian distribution. This is intended for the situation where we evaluate a series of terms until the remaining terms are smaller than some threshold (the magnitude). CONSIDER in general, we may want to apply a safety factor of 2 or 3 here.
Value parameters
- u
-
the magnitude of the input value used to compute fuzziness.
Attributes
- Returns
-
a Fuzziness[Double] instance representing the absolute fuzziness with Gaussian distribution.
- Inherited from:
- Fuzziness
Concrete fields
A variation on toString where we render this Fuzziness as a percentage.
A variation on toString where we render this Fuzziness as a percentage.
Attributes
- Returns
-
a String which ends with the '%' character (provided that this Fuzziness is relative).
This method normalizes the shape of the current Fuzziness[T]. If the shape is Gaussian, it returns the current instance. If the shape is Box, it converts the shape to a Gaussian with the same magnitude.
This method normalizes the shape of the current Fuzziness[T]. If the shape is Gaussian, it returns the current instance. If the shape is Box, it converts the shape to a Gaussian with the same magnitude.
Attributes
- Returns
-
a Fuzziness[T] object with a normalized Gaussian shape.
False.
False.