gnu.math
Class Quantity
public abstract
class
Quantity
extends Numeric
A quantity with a unit.
This generalizes the DSSSL quantity type (to more than lengths).
Method Summary |
Numeric | abs() |
static Quantity | add(Quantity x, Quantity y, int k) |
Numeric | add(Object y, int k) |
Numeric | addReversed(Numeric x, int k) |
static int | compare(Quantity x, Quantity y) |
int | compare(Object obj) |
int | compareReversed(Numeric x) |
Dimensions | dimensions() |
Numeric | div(Object y) |
static Quantity | divide(Quantity x, Quantity y) |
Numeric | divReversed(Numeric x) |
double | doubleImagValue() The value of the imaginary component, as a double.
|
double | doubleValue() The value of the real component, as a double.
|
RealNum | im() The value of the imaginary component, as a RealNum.
|
double | imValue() The value of the imaginary component, as a double.
|
static Quantity | make(Complex x, Unit u) |
static Quantity | make(RealNum re, RealNum im, Unit unit) |
static Quantity | make(double re, double im, Unit unit) |
Numeric | mul(Object y) |
Numeric | mulReversed(Numeric x) |
Numeric | neg() |
abstract Complex | number() |
RealNum | re() The value of the real component, as a RealNum.
|
double | reValue() The value of the real component, as a double.
|
static Quantity | times(Quantity x, Quantity y) |
String | toString(int radix) |
Unit | unit() |
public
Numeric add(Object y, int k)
public int compare(Object obj)
public int compareReversed(
Numeric x)
public double doubleImagValue()
The value of the imaginary component, as a double.
This is relative to the unit().dims - i.e. unit()/doubleValue()
is factored in.
public double doubleValue()
The value of the real component, as a double.
This is relative to the unit().dims - i.e. unit()/doubleValue()
is factored in.
The value of the imaginary component, as a RealNum.
The unit() is not factored in, so you actually need to multiply
by unit() to get the true imaginary component.
public final double imValue()
The value of the imaginary component, as a double.
This is relative to the unit().dims - i.e. unit().doubleValue()
is factored in.
A final alias for the virtual doubleImagValue.
public static
Quantity make(double re, double im,
Unit unit)
The value of the real component, as a RealNum.
The unit() is not factored in, so you actually need to multiply
by unit() to get the true real component.
public final double reValue()
The value of the real component, as a double.
This is relative to the unit().dims - i.e. unit().doubleValue()
is factored in.
A final alias for the virtual doubleValue.
public String toString(int radix)