com.phasmidsoftware.number.algebra.eager
Members list
Type members
Classlikes
Represents a mathematical solution, which can be either linear or quadratic in nature. This object provides factory methods for creating instances of Algebraic.
Trait to model the behavior of a solution to an equation. All such solutions are exact. Typically, however, such solutions cannot be represented exactly as pure numbers. The four parameters of a Algebraic are: base, offset, coefficient, and factor. Solutions are subject to various operations such as addition, scaling, and number conversions. Extends the NumberLike trait, inheriting behavior common to number-like entities.
Trait to model the behavior of a solution to an equation. All such solutions are exact. Typically, however, such solutions cannot be represented exactly as pure numbers. The four parameters of a Algebraic are: base, offset, coefficient, and factor. Solutions are subject to various operations such as addition, scaling, and number conversions. Extends the NumberLike trait, inheriting behavior common to number-like entities.
CONSIDER why is there so much dependence on the core module here? We shouldn't need that at all!
Attributes
- Companion
- object
- Supertypes
-
trait Solutiontrait Eagertrait DyadicOpstrait Approximatetrait Valuabletrait TypeSafetrait Normalizable[Valuable]trait Exactitudetrait Unitarytrait Zeroabletrait Numerictrait Renderableclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class LinearSolutionclass QuadraticSolution
A case class representing an angle in radians. This class implements the Additive and Radians traits, allowing operations such as addition, subtraction, and various type conversions. Angle represents the "circle group," which is a compact Abelian (commutative) group under angle addition, where the addition wraps around the circle. It is compact in that it is bounded by -𝛑 and 𝛑 (-180° and 180°). It is also commutative in that the order of addition is irrelevant. The circle group is a subset of the real numbers. The degrees attribute of an Angle is only of interest in the following situations:
A case class representing an angle in radians. This class implements the Additive and Radians traits, allowing operations such as addition, subtraction, and various type conversions. Angle represents the "circle group," which is a compact Abelian (commutative) group under angle addition, where the addition wraps around the circle. It is compact in that it is bounded by -𝛑 and 𝛑 (-180° and 180°). It is also commutative in that the order of addition is irrelevant. The circle group is a subset of the real numbers. The degrees attribute of an Angle is only of interest in the following situations:
- when the
Angleis parsed from aString, thedegreesattribute is set according to whether the degree symbol is present. - when the
Angleis converted to aString, thedegreesattribute is used to determine whether to use degrees or radians.
Angle does not support ordering or (general) comparison.
Value parameters
- degrees
-
whether the angle is in radians or degrees. In the latter case, the
numberattribute is unchanged (1 is still half of a full circle). - number
-
the value of the angle in radians
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait CanNormalize[Angle]trait Circletrait Rtrait Radianstrait Functionaltrait Ordered[Functional]trait Comparable[Functional]trait MaybeFuzzytrait Scalartrait Structuretrait WithFuzzinesstrait Eagertrait DyadicOpstrait Approximatetrait Valuabletrait TypeSafetrait Normalizable[Valuable]trait Exactitudetrait Unitarytrait Zeroabletrait Numerictrait Renderableclass Objecttrait Matchableclass AnyShow all
The Angle companion object contains utility methods, predefined constants, and typeclass instances for working with angles. Angles are represented using rational numbers and comply with the algebraic structure of a commutative group.
The Angle companion object contains utility methods, predefined constants, and typeclass instances for working with angles. Angles are represented using rational numbers and comply with the algebraic structure of a commutative group.
Attributes
Represents a binary exponential number structure, extending the Exponential class with operations and transformations specifically relevant to base-2 exponential numbers.
Represents a binary exponential number structure, extending the Exponential class with operations and transformations specifically relevant to base-2 exponential numbers.
This class provides methods to manipulate and interact with the exponential representation, including rendering, comparison, construction of new instances, and providing structural properties.
Value parameters
- exponent
-
the exponent value for the binary exponential
- maybeName
-
an optional name or label for the instance
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Exponentialtrait Can[Exponential]trait Transformedtrait Functionaltrait Ordered[Functional]trait Comparable[Functional]trait MaybeFuzzytrait Structuretrait WithFuzzinesstrait Eagertrait DyadicOpstrait Approximatetrait Valuabletrait TypeSafetrait Normalizable[Valuable]trait Exactitudetrait Unitarytrait Zeroabletrait Numerictrait Renderableclass Objecttrait Matchableclass AnyShow all
Represents a binary exponential number structure, which provides specialized operations and transformations for exponential numbers.
Represents a binary exponential number structure, which provides specialized operations and transformations for exponential numbers.
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
BinaryExponential.type
This is a wrapper for a Complex number to demonstrate where it should appear in the type hierarchy (it should extend Solution).
This is a wrapper for a Complex number to demonstrate where it should appear in the type hierarchy (it should extend Solution).
Attributes
- See also
-
com.phasmidsoftware.number.core.numerical.Complex
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Solutiontrait Eagertrait DyadicOpstrait Approximatetrait Valuabletrait TypeSafetrait Normalizable[Valuable]trait Exactitudetrait Unitarytrait Zeroabletrait Numerictrait Renderableclass Objecttrait Matchableclass AnyShow all
Companion object for the Complex class.
The Eager object provides factory methods to create instances of Valuable entities that are evaluated eagerly. These entities can represent numerical values parsed from strings, long integers, or specific types of mathematical fields.
The Eager object provides factory methods to create instances of Valuable entities that are evaluated eagerly. These entities can represent numerical values parsed from strings, long integers, or specific types of mathematical fields.
Attributes
A trait representing Eager computations or values, which are eagerly evaluated and have a canonical form. The Eager trait provides mechanisms for operations such as normalization, comparisons, and arithmetic operations on values. It also includes methods to handle approximate values (fuzzy operations) and exact ones.
A trait representing Eager computations or values, which are eagerly evaluated and have a canonical form. The Eager trait provides mechanisms for operations such as normalization, comparisons, and arithmetic operations on values. It also includes methods to handle approximate values (fuzzy operations) and exact ones.
Attributes
- Companion
- object
- Supertypes
-
trait DyadicOpstrait Approximatetrait Valuabletrait TypeSafetrait Normalizable[Valuable]trait Exactitudetrait Unitarytrait Zeroabletrait Numerictrait Renderableclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
trait Natobject NatZeroclass Succtrait Solutiontrait Algebraicclass LinearSolutionclass QuadraticSolutionclass Complextrait Structuretrait Functionaltrait Radiansclass Angletrait Transformedclass Exponentialclass BinaryExponentialclass NaturalExponentialclass InversePowertrait Scalarobject NoScalartrait Numbertrait ExactNumberclass RationalNumberclass WholeNumberclass RealShow all
Companion object for the Exact type, providing utility methods and typeclass instances.
Companion object for the Exact type, providing utility methods and typeclass instances.
The Exact object contains a strictly defined FuzzyEq instance that enforces exact equality. This implementation does not consider any probability thresholds or fuzziness levels, ensuring comparisons are deterministic and precise.
Attributes
The Exact trait represents an extension of the WithFuzziness trait, providing functionality to describe and manage fuzziness for instances requiring precise control.
The Exact trait represents an extension of the WithFuzziness trait, providing functionality to describe and manage fuzziness for instances requiring precise control.
This trait serves as a specialized version of WithFuzziness, with a default implementation overriding the fuzz method to provide a None value by default, indicating no fuzziness. It is particularly useful in cases where fuzziness is not applicable or is explicitly excluded.
Attributes
- Companion
- object
- Supertypes
- Known subtypes
Represents a number that can be expressed and operated on with exactitude.
Represents a number that can be expressed and operated on with exactitude.
Subtypes of ExactNumber include WholeNumber and RationalNumber. Although some instances of Real are exact, the type in general cannot be assumed to represent an exact value.
Attributes
- Supertypes
-
trait Scalable[ExactNumber]trait Qtrait Rtrait Exacttrait Numbertrait Ordered[Scalar]trait Comparable[Scalar]trait Scalartrait Structuretrait WithFuzzinesstrait Eagertrait DyadicOpstrait Approximatetrait Valuabletrait TypeSafetrait Normalizable[Valuable]trait Exactitudetrait Unitarytrait Zeroabletrait Numerictrait Renderableclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class RationalNumberclass WholeNumber
Represents an abstract exponential number.
Represents an abstract exponential number.
For example, for an Exponential object whose effective value is e (2.718...), then the member: number should be 1, that's to say ln(e).
The Exponential class defines properties and operations related to values that are represented internally as logarithmic values.
There are subtypes: NaturalExponential and BinaryExponential. We probably don't need DecimalExponential because we have BigDecimal as an alternative.
Value parameters
- number
-
the numerical value defined as the logarithm of this.
Attributes
- Constructor
-
Creates a new instance of
Exponentialwith the specified value. - Companion
- object
- Supertypes
-
trait Can[Exponential]trait Transformedtrait Functionaltrait Ordered[Functional]trait Comparable[Functional]trait MaybeFuzzytrait Structuretrait WithFuzzinesstrait Eagertrait DyadicOpstrait Approximatetrait Valuabletrait TypeSafetrait Normalizable[Valuable]trait Exactitudetrait Unitarytrait Zeroabletrait Numerictrait Renderableclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class BinaryExponentialclass NaturalExponential
The Exponential companion object contains utility methods, predefined constants, and typeclass instances for working with Logarithms. Logarithms are represented using rational numbers and comply with the algebraic structure of a commutative group.
The Exponential companion object contains utility methods, predefined constants, and typeclass instances for working with Logarithms. Logarithms are represented using rational numbers and comply with the algebraic structure of a commutative group.
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Exponential.type
The Extractors object provides utility methods and patterns for extracting or parsing data from complex structures. It is designed to streamline the process of retrieving specific information by encapsulating common extraction logic.
The Extractors object provides utility methods and patterns for extracting or parsing data from complex structures. It is designed to streamline the process of retrieving specific information by encapsulating common extraction logic.
This object is typically used when working with pattern matching, enabling concise and readable code for deconstructing data structures.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Extractors.type
The Functional trait serves as an abstraction for entities that wrap Number, such as Angle, NaturalExponential, etc. These are the types that can potentially have fuzz.
The Functional trait serves as an abstraction for entities that wrap Number, such as Angle, NaturalExponential, etc. These are the types that can potentially have fuzz.
Classes or traits that extend Functional encapsulate a Number instance, providing a consistent interface to access and work with numerical values. It is particularly useful in scenarios where mathematical operations or transformations are required on numbers.
Attributes
- Companion
- object
- Supertypes
-
trait Ordered[Functional]trait Comparable[Functional]trait MaybeFuzzytrait Structuretrait WithFuzzinesstrait Eagertrait DyadicOpstrait Approximatetrait Valuabletrait TypeSafetrait Normalizable[Valuable]trait Exactitudetrait Unitarytrait Zeroabletrait Numerictrait Renderableclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
trait Radiansclass Angletrait Transformedclass Exponentialclass BinaryExponentialclass NaturalExponentialclass InversePowerShow all
Companion object for the Functional trait. It provides a FuzzyEq instance to enable fuzzy equality comparisons for instances of Functional or its subclasses.
Companion object for the Functional trait. It provides a FuzzyEq instance to enable fuzzy equality comparisons for instances of Functional or its subclasses.
Fuzzy equality allows approximate comparisons based on a specified probability threshold. This is particularly useful for entities that encapsulate numeric values and may require imprecise equivalence checks.
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Functional.type
The HasImaginary object provides utilities for working with complex mathematical objects, particularly for extracting and transforming specific patterns in Eager instances.
The HasImaginary object provides utilities for working with complex mathematical objects, particularly for extracting and transforming specific patterns in Eager instances.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
HasImaginary.type
Represents an eager mathematical root, parameterized with an integral root degree and a base number.
Represents an eager mathematical root, parameterized with an integral root degree and a base number.
NOTE do not invoke the constructor directory: all construction should go via the apply method(s) which will normalize as appropriate.
TODO there are problems with multiplication (class cast exception, for example). Therefore, we should remove the CanMultiplyAndDivide mixin.
CONSIDER making this an (abstract?) class and having subclasses for square root and cube root.
Value parameters
- n
-
the degree of the root, specified as an integer
- number
-
the base
Numbervalue on which the root operation is defined
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Scalable[InversePower]trait Transformedtrait Functionaltrait Ordered[Functional]trait Comparable[Functional]trait MaybeFuzzytrait Structuretrait WithFuzzinesstrait Eagertrait DyadicOpstrait Approximatetrait Valuabletrait TypeSafetrait Normalizable[Valuable]trait Exactitudetrait Unitarytrait Zeroabletrait Numerictrait Renderableclass Objecttrait Matchableclass AnyShow all
The Root companion object contains utility methods, predefined constants, and typeclass instances for working with roots. Angles are represented using rational numbers and comply with the algebraic structure of a commutative group.
The Root companion object contains utility methods, predefined constants, and typeclass instances for working with roots. Angles are represented using rational numbers and comply with the algebraic structure of a commutative group.
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
InversePower.type
An object providing a custom extractor to check if a given Eager instance represents a finite value.
An object providing a custom extractor to check if a given Eager instance represents a finite value.
The IsFinite object can be used for pattern matching and extracting instances of Eager that are determined to be finite values, as determined by the absence of conditions that make it infinite.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
IsFinite.type
Provides an extractor for identifying whether an Eager instance satisfies the isZero condition.
Provides an extractor for identifying whether an Eager instance satisfies the isZero condition.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
IsFuzzy.type
An extractor object used for pattern matching to identify and extract Eager instances that satisfy specific conditions related to imaginary or irrational numbers.
An extractor object used for pattern matching to identify and extract Eager instances that satisfy specific conditions related to imaginary or irrational numbers.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
IsImaginary.type
Provides a utility for extracting infinite values from an Eager instance.
Provides a utility for extracting infinite values from an Eager instance.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
IsInfinite.type
Object containing utility methods for working with integers in the context of the Eager type, including a pattern matcher to extract integer values.
Object containing utility methods for working with integers in the context of the Eager type, including a pattern matcher to extract integer values.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
IsInteger.type
A utility object for pattern matching operations involving positive square roots. The main purpose of this object is to identify whether a given number or expression can be represented as the square root of another number.
A utility object for pattern matching operations involving positive square roots. The main purpose of this object is to identify whether a given number or expression can be represented as the square root of another number.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
IsSquareRoot.type
Companion object containing a custom extractor for identifying instances of the Eager class that satisfy a specific condition defined by the isUnity method.
Companion object containing a custom extractor for identifying instances of the Eager class that satisfy a specific condition defined by the isUnity method.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
IsUnity.type
Provides an extractor for identifying whether an Eager instance satisfies the isZero condition.
Provides an extractor for identifying whether an Eager instance satisfies the isZero condition.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
IsZero.type
The LinearSolution object provides utility functions for creating and manipulating instances of LinearSolution. It includes methods and typeclass instances for operations such as equality comparison and fuzzy equality checks.
The LinearSolution object provides utility functions for creating and manipulating instances of LinearSolution. It includes methods and typeclass instances for operations such as equality comparison and fuzzy equality checks.
The object also initializes the logger and defines givens for specific typeclass operations such as DyadicOperator, Eq, and FuzzyEq, allowing more advanced handling of LinearSolution instances.
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
LinearSolution.type
Represents a linear solution characterized by a single value. Implements the Algebraic trait where the base is equal to the value, the offset is Value.zero, and the factor is PureNumber. CONSIDER we should not have to deal with offset, factor, negative attributes here.
Represents a linear solution characterized by a single value. Implements the Algebraic trait where the base is equal to the value, the offset is Value.zero, and the factor is PureNumber. CONSIDER we should not have to deal with offset, factor, negative attributes here.
Value parameters
- value
-
the base value of the solution
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Algebraictrait Solutiontrait Eagertrait DyadicOpstrait Approximatetrait Valuabletrait TypeSafetrait Normalizable[Valuable]trait Exactitudetrait Unitarytrait Zeroabletrait Numerictrait Renderableclass Objecttrait Matchableclass AnyShow all
Represents natural numbers using Peano arithmetic.
Represents natural numbers using Peano arithmetic.
The Nat trait has two possible subtypes:
NatZero, representing the number 0.Succ, representing the successor of anotherNat(e.g.,Succ(NatZero)represents 1,Succ(Succ(NatZero))represents 2, and so on).
This encoding provides a type-level representation of natural numbers that can be used in functional programming constructs.
Operations on natural numbers, such as addition and multiplication, can be defined recursively via pattern matching.
CONSIDER increasing the use of the asInt value for better performance. But note that doing that destroys the Peano aspect of this class (keep in mind that we also have WholeNumber).
Attributes
- Companion
- object
- Supertypes
-
trait Ntrait Ztrait Qtrait Rtrait Eagertrait DyadicOpstrait Approximatetrait Valuabletrait TypeSafetrait Normalizable[Valuable]trait Exactitudetrait Unitarytrait Zeroabletrait Numerictrait Renderableclass Objecttrait Matchableclass AnyShow all
- Known subtypes
Provides a companion object for the sealed trait Nat, incorporating utility methods and type class instances for handling natural numbers defined via Peano arithmetic.
Provides a companion object for the sealed trait Nat, incorporating utility methods and type class instances for handling natural numbers defined via Peano arithmetic.
The object includes an implicit implementation of the Semiring type class, which introduces algebraic operations such as addition and multiplication specifically tailored for natural numbers (Nat).
Attributes
Represents the natural number 0 in Peano arithmetic.
Represents the natural number 0 in Peano arithmetic.
NatZero is the base case of the Nat type, signifying the absence of any successors. It serves as the foundation for constructing all other natural numbers through the Succ type.
Attributes
- Supertypes
-
trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalstrait Nattrait Ntrait Ztrait Qtrait Rtrait Eagertrait DyadicOpstrait Approximatetrait Valuabletrait TypeSafetrait Normalizable[Valuable]trait Exactitudetrait Unitarytrait Zeroabletrait Numerictrait Renderableclass Objecttrait Matchableclass AnyShow all
- Self type
-
NatZero.type
A case class representing a Exponential. This class implements the Additive and Radians traits, allowing operations such as addition, subtraction, and various type conversions.
A case class representing a Exponential. This class implements the Additive and Radians traits, allowing operations such as addition, subtraction, and various type conversions.
Exponential does not support ordering or comparison.
An example of the use of this class is as in this definition of Euler's number:
val e: Eager = NaturalExponential(WholeNumber.one)
Value parameters
- x
-
the value of the Exponential of this instance.
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Exponentialtrait Can[Exponential]trait Transformedtrait Functionaltrait Ordered[Functional]trait Comparable[Functional]trait MaybeFuzzytrait Structuretrait WithFuzzinesstrait Eagertrait DyadicOpstrait Approximatetrait Valuabletrait TypeSafetrait Normalizable[Valuable]trait Exactitudetrait Unitarytrait Zeroabletrait Numerictrait Renderableclass Objecttrait Matchableclass AnyShow all
Companion object for the NaturalExponential class, providing predefined constants and utility methods.
Companion object for the NaturalExponential class, providing predefined constants and utility methods.
The object contains common values associated with natural logarithmic operations and other relevant constants that can be used with Exponential instances.
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
NaturalExponential.type
NoScalar is a singleton object representing a special case of a Scalar that does not conform to standard scalar operations. It serves as a placeholder or non-standard entity in the scalar hierarchy, and most of its operations are unsupported or return default values.
NoScalar is a singleton object representing a special case of a Scalar that does not conform to standard scalar operations. It serves as a placeholder or non-standard entity in the scalar hierarchy, and most of its operations are unsupported or return default values.
This object extends both the Scalar and Exact traits, adhering to their respective contracts while providing specific overrides and limitations.
Attributes
- Supertypes
-
trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalstrait Exacttrait Scalartrait Structuretrait WithFuzzinesstrait Eagertrait DyadicOpstrait Approximatetrait Valuabletrait TypeSafetrait Normalizable[Valuable]trait Exactitudetrait Unitarytrait Zeroabletrait Numerictrait Renderableclass Objecttrait Matchableclass AnyShow all
- Self type
-
NoScalar.type
Represents a pure number that can be compared, approximated, and converted to other types.
Represents a pure number that can be compared, approximated, and converted to other types.
Number is a trait that extends the Scalar trait, adding functionality for ordered comparison.
CONSIDER why does it not extend Ordered[Number]?
Attributes
- Companion
- object
- Supertypes
-
trait Ordered[Scalar]trait Comparable[Scalar]trait Scalartrait Structuretrait WithFuzzinesstrait Eagertrait DyadicOpstrait Approximatetrait Valuabletrait TypeSafetrait Normalizable[Valuable]trait Exactitudetrait Unitarytrait Zeroabletrait Numerictrait Renderableclass Objecttrait Matchableclass AnyShow all
- Known subtypes
The Number object provides predefined constants and implicit conversions related to numerical operations. It includes representations of common numbers and utilities to work with the Number type.
Represents a solution to a quadratic equation in the context of a specific Factor.
Represents a solution to a quadratic equation in the context of a specific Factor.
Value parameters
- base
-
The base Value component of the solution.
- offset
-
The offset Value component of the solution, usually derived from the discriminant. QuadraticSolution models the structure of solutions to equations of the form: x^2 + px + q = 0. It encapsulates components necessary for representing and interpreting the result in terms of its
base, theoffsettypically arising from the quadratic formula's discriminant, and any contextual modifications by afactor. Instances of this class are designed to interact with theFactortype in performing various operations such as evaluating, converting, or rendering the solution accurately in diverse contexts.
Attributes
- Constructor
-
Creates a new instance of QuadraticSolution.
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Algebraictrait Solutiontrait Eagertrait DyadicOpstrait Approximatetrait Valuabletrait TypeSafetrait Normalizable[Valuable]trait Exactitudetrait Unitarytrait Zeroabletrait Numerictrait Renderableclass Objecttrait Matchableclass AnyShow all
Object containing predefined solutions to a quadratic equation and utilities.
Object containing predefined solutions to a quadratic equation and utilities.
The object includes two specific solutions (phi and psi) that are parametrized using the QuadraticSolution class, demonstrating the representation of roots of a quadratic equation. These roots are computed using predefined rational coefficients and specified root indices.
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
QuadraticSolution.type
The Radians object provides utilities and type class instances for the Radians type. It defines operators and equality mechanisms to enable operations and comparisons for instances of Radians and its related subtypes.
The Radians object provides utilities and type class instances for the Radians type. It defines operators and equality mechanisms to enable operations and comparisons for instances of Radians and its related subtypes.
Attributes
The Radians trait represents a scalar quantity expressed in radians, a unit of angular measure. It extends the Scalar trait, inheriting its properties and behaviors for numerical operations and comparison, while specifically associating the scalar with a conversion factor defined by Pi.
The Radians trait represents a scalar quantity expressed in radians, a unit of angular measure. It extends the Scalar trait, inheriting its properties and behaviors for numerical operations and comparison, while specifically associating the scalar with a conversion factor defined by Pi.
Attributes
- Companion
- object
- Supertypes
-
trait Functionaltrait Ordered[Functional]trait Comparable[Functional]trait MaybeFuzzytrait Scalartrait Structuretrait WithFuzzinesstrait Eagertrait DyadicOpstrait Approximatetrait Valuabletrait TypeSafetrait Normalizable[Valuable]trait Exactitudetrait Unitarytrait Zeroabletrait Numerictrait Renderableclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class Angle
Represents a rational number based on the Rational type, providing various mathematical operations and utilities applicable to rational numbers.
Represents a rational number based on the Rational type, providing various mathematical operations and utilities applicable to rational numbers.
This class extends several traits to enable arithmetic operations such as addition, subtraction, multiplication, and division. It also supports comparisons, conversions, scaling, and power operations.
The class is designed to work seamlessly with precise and exact number representations, ensuring that operations maintain a high level of numeric fidelity.
CONSIDER adding a percentage flag to Real. CONSIDER merging the Rational class into this class (there's no compelling reason to have two separate classes).
Value parameters
- percentage
-
whether this is a percentage value or not. Similarly to the
degreesattribute ofAngle, this is a flag that is primarily cosmetic. - r
-
The
Rationalvalue represented by thisRationalNumber.
Attributes
- Constructor
-
Creates a
RationalNumberwith the givenRationalvalue. - Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait CanAddAndSubtract[RationalNumber]trait CanNegate[RationalNumber]trait Can[RationalNumber]trait ExactNumbertrait Scalable[ExactNumber]trait Qtrait Rtrait Exacttrait Numbertrait Ordered[Scalar]trait Comparable[Scalar]trait Scalartrait Structuretrait WithFuzzinesstrait Eagertrait DyadicOpstrait Approximatetrait Valuabletrait TypeSafetrait Normalizable[Valuable]trait Exactitudetrait Unitarytrait Zeroabletrait Numerictrait Renderableclass Objecttrait Matchableclass AnyShow all
Represents a rational number with basic arithmetic operations and field properties. This class provides methods and implicit instances for managing rational numbers and their integration with mathematical abstractions such as the Field typeclass.
Represents a rational number with basic arithmetic operations and field properties. This class provides methods and implicit instances for managing rational numbers and their integration with mathematical abstractions such as the Field typeclass.
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
RationalNumber.type
Represents a fuzzy number, combining a numeric value with a level of fuzziness.
Represents a fuzzy number, combining a numeric value with a level of fuzziness.
A fuzzy number encapsulates imprecision or uncertainty alongside its value, and supports arithmetic operations and algebraic structure integration. Fuzzy numbers are useful in computational scenarios involving uncertainty, approximate calculations, or tolerances. This object provides factory methods, constants, and implicit type class instances for working with fuzzy numbers.
Attributes
Represents a (usually) fuzzy real number, which combines a numerical value with an associated fuzziness attribute. A fuzzy number expresses imprecision or uncertainty around a central numeric value, enabling computations that consider tolerances or relative inaccuracies in mathematical operations.
Represents a (usually) fuzzy real number, which combines a numerical value with an associated fuzziness attribute. A fuzzy number expresses imprecision or uncertainty around a central numeric value, enabling computations that consider tolerances or relative inaccuracies in mathematical operations.
This class extends additive and multiplicative algebraic structures (Additive and Multiplicative traits) while implementing Number as a base trait to encapsulate numeric-like behavior.
NOTE that a Real with empty fuzz is considered to be exact.
Value parameters
- fuzz
-
the optional fuzziness associated with the numeric value
- value
-
the central numeric value of the fuzzy number
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait MaybeFuzzytrait CanMultiplyAndDivide[Real]trait CanAddAndSubtract[Real]trait Rtrait Numbertrait Ordered[Scalar]trait Comparable[Scalar]trait Scalartrait Structuretrait WithFuzzinesstrait Eagertrait DyadicOpstrait Approximatetrait Valuabletrait TypeSafetrait Normalizable[Valuable]trait Exactitudetrait Unitarytrait Zeroabletrait Numerictrait Renderableclass Objecttrait Matchableclass AnyShow all
Represents a Scalar, which is a Structure that is linear with other scalar quantities and thus has a scale factor defined. Supports various mathematical operations and properties. Scalars include both exact and approximate numerical entities.
Represents a Scalar, which is a Structure that is linear with other scalar quantities and thus has a scale factor defined. Supports various mathematical operations and properties. Scalars include both exact and approximate numerical entities.
Scalar does not support ordering because not all scalars are comparable.
Multidimensional mathematical quantities such as Complex cannot be represented by a Scalar object.
Attributes
- Companion
- object
- Supertypes
-
trait Structuretrait WithFuzzinesstrait Eagertrait DyadicOpstrait Approximatetrait Valuabletrait TypeSafetrait Normalizable[Valuable]trait Exactitudetrait Unitarytrait Zeroabletrait Numerictrait Renderableclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
object NoScalartrait Numbertrait ExactNumberclass RationalNumberclass WholeNumberclass Realtrait Radiansclass AngleShow all
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).
Represents a Solution that is Eager, negatable, and branched with monotonic properties. This trait combines the characteristics of eagerly evaluated values, negatable structures, and entities with multiple branches (or solutions) represented by Structure.
Represents a Solution that is Eager, negatable, and branched with monotonic properties. This trait combines the characteristics of eagerly evaluated values, negatable structures, and entities with multiple branches (or solutions) represented by Structure.
Attributes
- Companion
- object
- Supertypes
-
trait Eagertrait DyadicOpstrait Approximatetrait Valuabletrait TypeSafetrait Normalizable[Valuable]trait Exactitudetrait Unitarytrait Zeroabletrait Numerictrait Renderableclass Objecttrait Matchableclass AnyShow all
- Known subtypes
Object containing functionality related to Solution, including mathematical computations and rendering solutions as LaTeX.
Represents a Structure, which is one-dimensional Structure that supports various mathematical operations and properties. Structures include both exact and approximate numerical entities.
Represents a Structure, which is one-dimensional Structure that supports various mathematical operations and properties. Structures include both exact and approximate numerical entities.
Structure does not support ordering because not all Structures are comparable.
Multidimensional mathematical quantities like Solution cannot be represented by a Structure object.
Attributes
- Companion
- object
- Supertypes
-
trait WithFuzzinesstrait Eagertrait DyadicOpstrait Approximatetrait Valuabletrait TypeSafetrait Normalizable[Valuable]trait Exactitudetrait Unitarytrait Zeroabletrait Numerictrait Renderableclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
trait Functionaltrait Radiansclass Angletrait Transformedclass Exponentialclass BinaryExponentialclass NaturalExponentialclass InversePowertrait Scalarobject NoScalartrait Numbertrait ExactNumberclass RationalNumberclass WholeNumberclass RealShow all
The Structure object serves as a companion object for the Structure class, providing common operations, typeclass instances, and supplementary functionality.
The Structure object serves as a companion object for the Structure class, providing common operations, typeclass instances, and supplementary functionality.
Key responsibilities of this object include:
- Defining typeclass instances for equality (
Eq) and fuzzy equality (FuzzyEq) forStructuretypes. - Implementing a
DyadicOperatorinstance that provides a mechanism for combining twoStructureobjects, supporting both same-type and cross-type operations. - Logging and error handling during certain cross-type comparisons.
The Structure class represents a hierarchy of mathematical structures, including scalars, functional values, and other specific instances, and this companion object facilitates their interoperation.
Attributes
Represents the successor of a natural number in Peano arithmetic.
Represents the successor of a natural number in Peano arithmetic.
The Succ class is a case class that extends the Nat trait and signifies the successor of another natural number.
Value parameters
- pred
-
The predecessor of this natural number, which is also a
Nat.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Nattrait Ntrait Ztrait Qtrait Rtrait Eagertrait DyadicOpstrait Approximatetrait Valuabletrait TypeSafetrait Normalizable[Valuable]trait Exactitudetrait Unitarytrait Zeroabletrait Numerictrait Renderableclass Objecttrait Matchableclass AnyShow all
Represents a Structure, which is a one-dimensional Structure that can be ordered and supports various mathematical operations and properties. Structures include both exact and approximate numerical entities.
Represents a Structure, which is a one-dimensional Structure that can be ordered and supports various mathematical operations and properties. Structures include both exact and approximate numerical entities.
Structure does not support ordering because not all Structures are comparable.
Multidimensional mathematical quantities such as Complex cannot be represented by a Structure object.
Attributes
- Companion
- object
- Supertypes
-
trait Functionaltrait Ordered[Functional]trait Comparable[Functional]trait MaybeFuzzytrait Structuretrait WithFuzzinesstrait Eagertrait DyadicOpstrait Approximatetrait Valuabletrait TypeSafetrait Normalizable[Valuable]trait Exactitudetrait Unitarytrait Zeroabletrait Numerictrait Renderableclass Objecttrait Matchableclass AnyShow all
- Known subtypes
The Transformed object provides utility methods and type class instances for working with entities of type Transformed. It includes implementations of type-safe equality and fuzzy equality, as well as the ability to handle dyadic operations between instances of Transformed or its subtypes.
The Transformed object provides utility methods and type class instances for working with entities of type Transformed. It includes implementations of type-safe equality and fuzzy equality, as well as the ability to handle dyadic operations between instances of Transformed or its subtypes.
This object defines functionality for:
- Performing dyadic operations using contextual
DyadicOperatorinstances. - Providing type class instances for equality (
Eq) and fuzzy equality (FuzzyEq). - Handling edge cases and unsupported cross-type operations between subtypes.
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Transformed.type
A case class representing a whole number.
A case class representing a whole number.
The WholeNumber class models any integer in the Z domain and its associated operations, enabling addition, inversion, comparison, and rendering.
Value parameters
- x
-
a BigInt value representing the whole number
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait CanAddAndSubtract[WholeNumber]trait CanNegate[WholeNumber]trait Can[WholeNumber]trait Ztrait ExactNumbertrait Scalable[ExactNumber]trait Qtrait Rtrait Exacttrait Numbertrait Ordered[Scalar]trait Comparable[Scalar]trait Scalartrait Structuretrait WithFuzzinesstrait Eagertrait DyadicOpstrait Approximatetrait Valuabletrait TypeSafetrait Normalizable[Valuable]trait Exactitudetrait Unitarytrait Zeroabletrait Numerictrait Renderableclass Objecttrait Matchableclass AnyShow all
The WholeNumber companion object contains utility methods, predefined constants, and typeclass instances for working with WholeNumbers. WholeNumbers are represented using rational numbers and comply with the algebraic structure of a commutative group.
The WholeNumber companion object contains utility methods, predefined constants, and typeclass instances for working with WholeNumbers. WholeNumbers are represented using rational numbers and comply with the algebraic structure of a commutative group.
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
WholeNumber.type