public final class PrimitiveScalar extends Number implements Scalar<Double>, NumberContext.Enforceable<PrimitiveScalar>
Scalar.Factory<N extends Number>
ScalarOperation.Addition<T,N extends Number>, ScalarOperation.Division<T,N extends Number>, ScalarOperation.Multiplication<T,N extends Number>, ScalarOperation.Subtraction<T,N extends Number>
Modifier and Type | Field and Description |
---|---|
static Scalar.Factory<Double> |
FACTORY |
static PrimitiveScalar |
NaN |
static PrimitiveScalar |
NEG |
static PrimitiveScalar |
NEGATIVE_INFINITY |
static PrimitiveScalar |
ONE |
static PrimitiveScalar |
POSITIVE_INFINITY |
static PrimitiveScalar |
TWO |
static PrimitiveScalar |
ZERO |
Constructor and Description |
---|
PrimitiveScalar() |
Modifier and Type | Method and Description |
---|---|
PrimitiveScalar |
add(double arg) |
PrimitiveScalar |
add(Double arg) |
int |
compareTo(Double reference) |
PrimitiveScalar |
conjugate()
This method will (most likely) be moved to some other interface in the future! Just have to figure
out where it fits...
|
PrimitiveScalar |
divide(double arg) |
PrimitiveScalar |
divide(Double arg) |
double |
doubleValue() |
PrimitiveScalar |
enforce(NumberContext context) |
boolean |
equals(Object obj) |
float |
floatValue() |
Double |
get() |
int |
hashCode() |
int |
intValue() |
PrimitiveScalar |
invert()
The multiplicative inverse.
|
boolean |
isAbsolute() |
static boolean |
isAbsolute(double value) |
static boolean |
isInfinite(double value) |
static boolean |
isNaN(double value) |
boolean |
isSmall(double comparedTo) |
static boolean |
isSmall(double comparedTo,
double value) |
long |
longValue() |
PrimitiveScalar |
multiply(double arg) |
PrimitiveScalar |
multiply(Double arg) |
PrimitiveScalar |
negate()
The additive inverse of this.
|
double |
norm()
this == this.signum().multiply(this.norm()) |
static PrimitiveScalar |
of(double value) |
PrimitiveScalar |
signum()
this == this.signum().multiply(this.norm()) |
PrimitiveScalar |
subtract(double arg) |
PrimitiveScalar |
subtract(Double arg) |
BigDecimal |
toBigDecimal() |
String |
toString() |
String |
toString(NumberContext context) |
static PrimitiveScalar |
valueOf(double value) |
static PrimitiveScalar |
valueOf(Number number) |
byteValue, shortValue
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
add, divide, multiply, subtract, toPlainString
byteValue, shortValue
public static final Scalar.Factory<Double> FACTORY
public static final PrimitiveScalar NaN
public static final PrimitiveScalar NEG
public static final PrimitiveScalar NEGATIVE_INFINITY
public static final PrimitiveScalar ONE
public static final PrimitiveScalar POSITIVE_INFINITY
public static final PrimitiveScalar TWO
public static final PrimitiveScalar ZERO
public static boolean isAbsolute(double value)
public static boolean isInfinite(double value)
public static boolean isNaN(double value)
public static boolean isSmall(double comparedTo, double value)
public static PrimitiveScalar of(double value)
public static PrimitiveScalar valueOf(double value)
public static PrimitiveScalar valueOf(Number number)
public PrimitiveScalar add(double arg)
add
in interface ScalarOperation.Addition<Scalar<Double>,Double>
this + scalarAddend
.public PrimitiveScalar add(Double arg)
add
in interface ScalarOperation.Addition<Scalar<Double>,Double>
this + scalarAddend
.public int compareTo(Double reference)
compareTo
in interface Comparable<Double>
public PrimitiveScalar conjugate()
VectorSpace
This method will (most likely) be moved to some other interface in the future! Just have to figure out where it fits...
The conjugate transpose of a matrix and/or the conjugate of a scalar/field like ComplexNumber or Quaternion.
The conjugate transpose of a real matrix is simply its transpose.
conjugate
in interface VectorSpace<Scalar<Double>,Double>
public PrimitiveScalar divide(double arg)
divide
in interface ScalarOperation.Division<Scalar<Double>,Double>
this / scalarDivisor
.public PrimitiveScalar divide(Double arg)
divide
in interface ScalarOperation.Division<Scalar<Double>,Double>
this / scalarDivisor
.public double doubleValue()
doubleValue
in interface AccessScalar<Double>
doubleValue
in class Number
Number.doubleValue()
public PrimitiveScalar enforce(NumberContext context)
enforce
in interface NumberContext.Enforceable<PrimitiveScalar>
public float floatValue()
floatValue
in interface AccessScalar<Double>
floatValue
in class Number
Number.floatValue()
public Double get()
get
in interface AccessScalar<Double>
public int intValue()
intValue
in interface AccessScalar<Double>
intValue
in class Number
Number.intValue()
public PrimitiveScalar invert()
Group.Multiplicative
invert
in interface Group.Multiplicative<Scalar<Double>>
IDENTITY / this
.public boolean isAbsolute()
isAbsolute
in interface Scalar<Double>
Scalar.isAbsolute()
public boolean isSmall(double comparedTo)
isSmall
in interface NormedVectorSpace<Scalar<Double>,Double>
comparedTo
- What to compare withpublic long longValue()
longValue
in interface AccessScalar<Double>
longValue
in class Number
Number.longValue()
public PrimitiveScalar multiply(double arg)
multiply
in interface ScalarOperation.Multiplication<Scalar<Double>,Double>
this * scalarMultiplicand
.public PrimitiveScalar multiply(Double arg)
multiply
in interface ScalarOperation.Multiplication<Scalar<Double>,Double>
this * multiplicand
.public PrimitiveScalar negate()
Group.Additive
negate
in interface Group.Additive<Scalar<Double>>
-this
.public double norm()
NormedVectorSpace
this == this.signum().multiply(this.norm())
norm
in interface NormedVectorSpace<Scalar<Double>,Double>
public PrimitiveScalar signum()
NormedVectorSpace
this == this.signum().multiply(this.norm())
signum
in interface NormedVectorSpace<Scalar<Double>,Double>
public PrimitiveScalar subtract(double arg)
subtract
in interface ScalarOperation.Subtraction<Scalar<Double>,Double>
this - scalarSubtrahend
.public PrimitiveScalar subtract(Double arg)
subtract
in interface ScalarOperation.Subtraction<Scalar<Double>,Double>
this - scalarSubtrahend
.public BigDecimal toBigDecimal()
toBigDecimal
in interface Scalar<Double>
public String toString(NumberContext context)
Copyright © 2019 Optimatika. All rights reserved.