| java.lang.Object gnu.math.Dimensions
Dimensions | public class Dimensions (Code) | | A Dimensions object represents the product or ratio of BaseUnits.
The idea is that in order to add two Quantities (such as 3mm + 5cm)
their Dimensions have to match. Equal dimensions are also ==.
author: Per Bothner. |
Field Summary | |
public static Dimensions | Empty The empty Dimensions that pure numbers have. | BaseUnit[] | bases The BaseUnits that this dimension is defined in terms of.
The BaseUnits are in order of their index, and the last
element is Unit.Empty. | int | hash_code | short[] | powers For each baseunit in bases[i], powers[i] is the corresponding exponent.
It is never zero (as long as i is less than the index of Unit.Empty). |
Empty | public static Dimensions Empty(Code) | | The empty Dimensions that pure numbers have.
|
bases | BaseUnit[] bases(Code) | | The BaseUnits that this dimension is defined in terms of.
The BaseUnits are in order of their index, and the last
element is Unit.Empty.
|
powers | short[] powers(Code) | | For each baseunit in bases[i], powers[i] is the corresponding exponent.
It is never zero (as long as i is less than the index of Unit.Empty).
|
getPower | public int getPower(BaseUnit unit)(Code) | | Get the exponent for a BaseUnit in this Dimensions object.
|
hashCode | final public int hashCode()(Code) | | |
|
|