MaybeFuzzy

com.phasmidsoftware.number.algebra.core.MaybeFuzzy
See theMaybeFuzzy companion object
trait MaybeFuzzy extends Renderable

A trait representing an optional association with a Fuzziness[Double].

This can be used to indicate whether an entity has an associated fuzzy or uncertain aspect to its representation or behavior. The presence of fuzziness is represented as an Option[Fuzziness[Double]], where Some indicates the presence of fuzziness and None indicates its absence.

Attributes

Companion
object
Graph
Supertypes
trait Renderable
class Object
trait Matchable
class Any
Known subtypes
class Angle
trait Functional
trait Radians
trait Transformed
class Exponential
class InversePower
class Real
Show all

Members list

Value members

Abstract methods

def maybeFuzz: Option[Fuzziness[Double]]

Represents an optional fuzziness value associated with the implementing entity.

Represents an optional fuzziness value associated with the implementing entity.

This method provides a way to retrieve the fuzziness information if it exists. The fuzziness is represented as an Option[Fuzziness[Double]]:

  • Some(Fuzziness[Double]): Indicates the presence of fuzziness.
  • None: Indicates the absence of fuzziness.

Attributes

Returns

An Option containing a Fuzziness[Double] if fuzziness is present, or None if it is not.

def nominalValue: Double

Retrieves the nominal (non-fuzzy) value associated with the entity.

Retrieves the nominal (non-fuzzy) value associated with the entity.

This value represents the precise or primary measurement or parameter of the entity, without considering any associated fuzziness or uncertainty.

Attributes

Returns

The nominal value as a Double.

Concrete methods

def asAbsolute: String
Extension method from MaybeFuzzy

Converts the value of the current instance into its absolute String representation, always using scientific notation (e.g. "1.00(1)E+02").

Converts the value of the current instance into its absolute String representation, always using scientific notation (e.g. "1.00(1)E+02").

If fuzziness is present, it normalizes it to absolute form and formats it in scientific notation with embedded uncertainty digits. If no fuzziness is present, the nominal value is returned as rendered by m.render.

Attributes

Returns

A string in scientific notation with absolute uncertainty, or the nominal value if no fuzziness is associated.

Inherited and Abstract methods

def render: String

Method to render this Valuable for presentation to the user. NOTE to implementors: never ever invoke this.toString in your implementation lest you get a StackOverflow.

Method to render this Valuable for presentation to the user. NOTE to implementors: never ever invoke this.toString in your implementation lest you get a StackOverflow.

Attributes

Returns

a String

Inherited from:
Renderable