Tabnine Logo
Dimension.multiply
Code IndexAdd Tabnine to your IDE (free)

How to use
multiply
method
in
javax.measure.Dimension

Best Java code snippets using javax.measure.Dimension.multiply (Showing top 8 results out of 315)

origin: tec.units/unit-ri

/**
 * 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;
}
origin: tec.units/indriya

/**
 * 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;
}
origin: tec.uom/uom-se

/**
 * 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;
}
origin: apache/sis

/**
 * 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));
}
origin: apache/sis

/**
 * Tests {@link UnitDimension#multiply(Dimension)}.
 */
@Test
@DependsOnMethod("testEqualsAndHashCode")
public void testMultiply() {
  assertSame(LENGTH, LENGTH.multiply(DIMENSIONLESS));
  assertSame(AREA,   LENGTH.multiply(LENGTH));
  assertSame(VOLUME, LENGTH.multiply(AREA));
  assertSame(VOLUME, AREA  .multiply(LENGTH));
  final Map<Dimension,Integer> expected = new HashMap<>(4);
  assertNull(expected.put(LENGTH, 1));
  assertNull(expected.put(TIME,   1));
  assertMapEquals(expected, LENGTH.multiply(TIME).getBaseDimensions());
}
origin: tec.uom/uom-se

@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;
}
origin: tec.units/indriya

@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;
}
origin: tec.units/unit-ri

@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;
}
javax.measureDimensionmultiply

Popular methods of Dimension

  • getBaseDimensions
  • pow
  • root
  • divide

Popular in Java

  • Reactive rest calls using spring rest template
  • setContentView (Activity)
  • findViewById (Activity)
  • compareTo (BigDecimal)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now