Package org.ojalgo.type.math
Enum Class MathType
- All Implemented Interfaces:
Serializable
,Comparable<MathType>
,Constable
The number sets supported by ojAlgo, paired with a declaration of how they are implemented/approximated.
The naming scheme is the
NumberSet
symbol combined with the total number of bits used to represent
the components.
For instance: C128 refers to C = ComplexNumber
which is implemented as two double:s each of 64
bits. If there would be a float based complex number implementation it would be named C064.
R032 is a Real number implemented/approximated using a single 32 bit float.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Class
<?> long
boolean
static boolean
isPrimitive
(MathType type1, MathType type2) static MathType
Returns the enum constant of this class with the specified name.static MathType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
C128
Complex Number: 2 * double -
H256
Quaternion: 4 * double -
Q128
Rational Number: 2 * long -
R032
Real Number: float -
R064
Real Number: double -
R128
Real Number: 2 * doubleQuadruple precision emulated using a pair of double precision numbers
-
R256
Real Number:BigDecimal
Refer to it as "256" since (the way it's used in ojAlgo) it roughly corresponds to binary 256 octuple precision.
-
Z008
Integer: byte -
Z016
Integer: short -
Z032
Integer: int -
Z064
Integer: long
-
-
Field Details
-
myComponents
private final int myComponents -
myJavaType
-
myNumberSet
-
-
Constructor Details
-
MathType
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
isPrimitive
-
common
-
getComponents
public int getComponents() -
getJavaClass
-
getJavaType
-
getNumberSet
-
getTotalMemory
public long getTotalMemory() -
isPrimitive
public boolean isPrimitive()
-