/** * Returns the quotient of this dimension with the one specified. * * @param that * the dimension divisor. * @return <code>this.multiply(that.pow(-1))</code> * @since 1.0 */ public Dimension divide(Dimension that) { return this.multiply(that.pow(-1)); }
/** * Returns the quotient of this dimension with the one specified. * * @param that * the dimension divisor. * @return <code>this.multiply(that.pow(-1))</code> * @since 1.0 */ public Dimension divide(Dimension that) { return this.multiply(that.pow(-1)); }
/** * Returns the quotient of this dimension with the one specified. * * @param that * the dimension divisor. * @return <code>this.multiply(that.pow(-1))</code> * @since 1.0 */ public Dimension divide(Dimension that) { return this.multiply(that.pow(-1)); }
/** * Returns the fundamental dimension for the one specified. If the specified dimension is a dimensional product, the dimensional product of its * fundamental dimensions is returned. Physical quantities are considered commensurate only if their fundamental dimensions are equals using the * current physics model. * * @param dimension * the dimension for which the fundamental dimension is returned. * @return <code>this</code> or a rational product of fundamental dimension. */ public Dimension getFundamentalDimension(Dimension dimension) { Map<? extends Dimension, Integer> dimensions = dimension.getBaseDimensions(); if (dimensions == null) return dimension; // Fundamental dimension. // Dimensional Product. Dimension fundamentalProduct = QuantityDimension.NONE; for (Map.Entry<? extends Dimension, Integer> e : dimensions.entrySet()) { fundamentalProduct = fundamentalProduct.multiply(this.getFundamentalDimension(e.getKey())).pow(e.getValue()); } return fundamentalProduct; }
/** * Returns the fundamental dimension for the one specified. If the specified dimension is a dimensional product, the dimensional product of its * fundamental dimensions is returned. Physical quantities are considered commensurate only if their fundamental dimensions are equals using the * current physics model. * * @param dimension * the dimension for which the fundamental dimension is returned. * @return <code>this</code> or a rational product of fundamental dimension. */ public Dimension getFundamentalDimension(Dimension dimension) { Map<? extends Dimension, Integer> dimensions = dimension.getBaseDimensions(); if (dimensions == null) return dimension; // Fundamental dimension. // Dimensional Product. Dimension fundamentalProduct = QuantityDimension.NONE; for (Map.Entry<? extends Dimension, Integer> e : dimensions.entrySet()) { fundamentalProduct = fundamentalProduct.multiply(this.getFundamentalDimension(e.getKey())).pow(e.getValue()); } return fundamentalProduct; }
/** * Returns the fundamental dimension for the one specified. If the specified dimension is a dimensional product, the dimensional product of its * fundamental dimensions is returned. Physical quantities are considered commensurate only if their fundamental dimensions are equals using the * current physics model. * * @param dimension * the dimension for which the fundamental dimension is returned. * @return <code>this</code> or a rational product of fundamental dimension. */ public Dimension getFundamentalDimension(Dimension dimension) { Map<? extends Dimension, Integer> dimensions = dimension.getBaseDimensions(); if (dimensions == null) return dimension; // Fundamental dimension. // Dimensional Product. Dimension fundamentalProduct = QuantityDimension.NONE; for (Map.Entry<? extends Dimension, Integer> e : dimensions.entrySet()) { fundamentalProduct = fundamentalProduct.multiply(this.getFundamentalDimension(e.getKey())).pow(e.getValue()); } return fundamentalProduct; }
@Override public Dimension getDimension() { Dimension dimension = QuantityDimension.NONE; for (int i = 0; i < this.getUnitCount(); i++) { Unit<?> unit = this.getUnit(i); if (this.elements != null && unit.getDimension() != null) { Dimension d = unit.getDimension().pow(this.getUnitPow(i)).root(this.getUnitRoot(i)); dimension = dimension.multiply(d); } } return dimension; }
@Override public Dimension getDimension() { Dimension dimension = QuantityDimension.NONE; for (int i = 0; i < this.getUnitCount(); i++) { Unit<?> unit = this.getUnit(i); if (this.elements != null && unit.getDimension() != null) { Dimension d = unit.getDimension().pow(this.getUnitPow(i)).root(this.getUnitRoot(i)); dimension = dimension.multiply(d); } } return dimension; }
/** * Returns the specific detectivity dimension, which is T^2.5 / (M⋅L). */ static Dimension specificDetectivity() { return TIME.pow(2).divide(MASS.multiply(LENGTH)).multiply(TIME.root(2)); }
@Override public Dimension getDimension() { Dimension dimension = QuantityDimension.NONE; for (int i = 0; i < this.getUnitCount(); i++) { Unit<?> unit = this.getUnit(i); if (this.elements != null && unit.getDimension() != null) { Dimension d = unit.getDimension().pow(this.getUnitPow(i)).root(this.getUnitRoot(i)); if (dimension != null) { dimension = dimension.multiply(d); } else { dimension = d; // XXX hackaround } } } return dimension; }