gnu.math
Class DQuantity
java.lang.Object
   java.lang.Number
java.lang.Number
       gnu.math.Numeric
gnu.math.Numeric
           gnu.math.Quantity
gnu.math.Quantity
               gnu.math.DQuantity
gnu.math.DQuantity
- All Implemented Interfaces: 
- java.io.Externalizable, java.io.Serializable
- public class DQuantity 
- extends Quantity- implements java.io.Externalizable
A Quantity represented as the product of a plain double and a Unit.
- See Also:
- Serialized Form
 
 
 
 
| Methods inherited from class gnu.math.Quantity | 
| abs, add, compare, compare, compareReversed, dimensions, divide, doubleImagValue, im, imValue, make, make, make, neg, reValue, times, toString | 
 
| Methods inherited from class gnu.math.Numeric | 
| add, div_inv, equals, floatValue, geq, grt, intValue, longValue, mul_ident, power, sub, toString | 
 
| Methods inherited from class java.lang.Number | 
| byteValue, shortValue | 
 
| Methods inherited from class java.lang.Object | 
| clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
 
DQuantity
public DQuantity(double factor,
                 Unit unit)
unit
public final Unit unit()
- 
- Overrides:
- unitin class- Quantity
 
- 
 
number
public final Complex number()
- 
- Specified by:
- numberin class- Quantity
 
- 
 
re
public final RealNum re()
- Description copied from class: Quantity
- 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.
 
- 
- Overrides:
- rein class- Quantity
 
- 
 
doubleValue
public final double doubleValue()
- Description copied from class: Quantity
- The value of the real component, as a double.
 This is relative to the unit().dims - i.e. unit()/doubleValue()
 is factored in.
 
- 
- Overrides:
- doubleValuein class- Quantity
 
- 
 
isExact
public boolean isExact()
- 
- Specified by:
- isExactin class- Numeric
 
- 
 
isZero
public boolean isZero()
- 
- Specified by:
- isZeroin class- Numeric
 
- 
 
add
public static DQuantity add(DQuantity x,
                            DQuantity y,
                            double k)
- 
 
- 
 
times
public static DQuantity times(DQuantity x,
                              DQuantity y)
- 
 
- 
 
divide
public static DQuantity divide(DQuantity x,
                               DQuantity y)
- 
 
- 
 
add
public Numeric add(java.lang.Object y,
                   int k)
- Description copied from class: Numeric
- Return this + k * obj.
 
- 
- Overrides:
- addin class- Quantity
 
- 
 
addReversed
public Numeric addReversed(Numeric x,
                           int k)
- Description copied from class: Numeric
- Calculate x+k&this.
 
- 
- Overrides:
- addReversedin class- Quantity
 
- 
 
mul
public Numeric mul(java.lang.Object y)
- 
- Overrides:
- mulin class- Quantity
 
- 
 
mulReversed
public Numeric mulReversed(Numeric x)
- 
- Overrides:
- mulReversedin class- Quantity
 
- 
 
div
public Numeric div(java.lang.Object y)
- 
- Overrides:
- divin class- Quantity
 
- 
 
divReversed
public Numeric divReversed(Numeric x)
- 
- Overrides:
- divReversedin class- Quantity
 
- 
 
writeExternal
public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
- 
- Specified by:
- writeExternalin interface- java.io.Externalizable
 
- 
- Throws:
- java.io.IOException
 
readExternal
public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
- 
- Specified by:
- readExternalin interface- java.io.Externalizable
 
- 
- Throws:
- java.io.IOException
- java.lang.ClassNotFoundException