The Scalar object is a utility for creating and representing scalar values with dimensional factors, exact or approximate numerical precision, and optional fuzziness (uncertainty or imprecision).
Attributes
Members list
Value members
Concrete methods
Creates a Scalar instance based on the input core.Number. Converts the number into an appropriate scalar representation, either exact or fuzzy, depending on the properties of the input.
Creates a Scalar instance based on the input core.Number. Converts the number into an appropriate scalar representation, either exact or fuzzy, depending on the properties of the input.
CONSIDER moving this up into Structure.
Value parameters
- x
-
the
core.Numberto be converted into aScalar. It can be anExactNumberor aFuzzyNumber, each with specific properties such as value, factor, and optional fuzziness.
Attributes
- Returns
-
the resulting
Scalarbased on the input number's properties, which encapsulates its exact value, factor, and optional fuzziness.
Creates a Scalar instance based on the given input parameters. The method evaluates the input value and optional fuzziness to determine the appropriate numerical representation (e.g., WholeNumber, Real, RationalNumber) and associates it with the provided factor (e.g., PureNumber, Radian).
Creates a Scalar instance based on the given input parameters. The method evaluates the input value and optional fuzziness to determine the appropriate numerical representation (e.g., WholeNumber, Real, RationalNumber) and associates it with the provided factor (e.g., PureNumber, Radian).
CONSIDER this should return a Scalar. Alternatively, it shoul be moved to Structure and renamed to createStructure.
Value parameters
- factor
-
the dimensional factor associated with the scalar, such as
PureNumber,Radian, or other domain-specific factors. - fuzz
-
an optional fuzziness component representing the uncertainty or imprecision in the numerical value.
- value
-
the numerical value, which can either be a right value for exact numbers (e.g., integers, floating-point values) or a left value for rational or other representations.
Attributes
- Returns
-
the resulting
Scalarbased on the input values, factor, and optional fuzziness. - Note
-
Throws an com.phasmidsoftware.number.algebra.util.AlgebraException if called with unsupported factors.
Givens
Givens
Implicits
Implicits
LatexRenderer for Scalar (general case).
LatexRenderer for Scalar (general case).
Attempts to render based on the concrete type.