Interface DimensionlessFunctions<U extends Unit<U>,​T extends Value<U,​T>>

Type Parameters:
U - the unit of the type
T - the type of the (dimensionless) value that the functions operate on
All Known Implementing Classes:
Dimensionless, DimensionlessMatrix, DimensionlessVector, FloatDimensionless, FloatDimensionlessMatrix, FloatDimensionlessVector

public interface DimensionlessFunctions<U extends Unit<U>,​T extends Value<U,​T>>
Interface to force most functions of Math, which have not yet been implemented by MathFunctionsRel, to be implemented, with the exception of toRadians() and toDegrees() -- these functions are available for angles.

Copyright (c) 2015-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUNITS License.

version 26 jun, 2015

Author:
Alexander Verbraeck, Peter Knoppers
  • Method Summary

    Modifier and Type Method Description
    T acos()
    Set the value(s) to the arc cosine of the value(s); the resulting angle is in the range 0.0 through pi.
    T asin()
    Set the value(s) to the arc sine of the value(s); the resulting angle is in the range -pi/2 through pi/2.
    T atan()
    Set the value(s) to the arc tangent of the value(s); the resulting angle is in the range -pi/2 through pi/2.
    T cbrt()
    Set the value(s) to the(ir) cube root.
    T cos()
    Set the value(s) to the trigonometric cosine of the value(s).
    T cosh()
    Set the value(s) to the hyperbolic cosine of the value(s).
    T exp()
    Set the value(s) to Euler's number e raised to the power of the value(s).
    T expm1()
    Set the value(s) to Euler's number e raised to the power of the value(s) minus 1 (e^x - 1).
    T inv()
    Set the value(s) to the complement (1.0/x) of the value(s).
    T log()
    Set the value(s) to the natural logarithm (base e) of the value(s).
    T log10()
    Set the value(s) to the base 10 logarithm of the value(s).
    T log1p()
    Set the value(s) to the natural logarithm of the sum of the value(s) and 1.
    T pow​(double x)
    Set the value(s) to the value(s) raised to the power of the argument.
    T signum()
    Set the value(s) to the signum function of the value(s); zero if the argument is zero, 1.0 if the argument is greater than zero, -1.0 if the argument is less than zero.
    T sin()
    Set the value(s) to the trigonometric sine of the value(s).
    T sinh()
    Set the value(s) to the hyperbolic sine of the value(s).
    T sqrt()
    Set the value(s) to the correctly rounded positive square root of the value(s).
    T tan()
    Set the value(s) to the trigonometric tangent of the value(s).
    T tanh()
    Set the value(s) to the hyperbolic tangent of the value(s).
  • Method Details

    • acos

      T acos()
      Set the value(s) to the arc cosine of the value(s); the resulting angle is in the range 0.0 through pi.
      Returns:
      T; the modified T
    • asin

      T asin()
      Set the value(s) to the arc sine of the value(s); the resulting angle is in the range -pi/2 through pi/2.
      Returns:
      T; the modified T
    • atan

      T atan()
      Set the value(s) to the arc tangent of the value(s); the resulting angle is in the range -pi/2 through pi/2.
      Returns:
      T; the modified T
    • cbrt

      T cbrt()
      Set the value(s) to the(ir) cube root.
      Returns:
      T; the modified T
    • cos

      T cos()
      Set the value(s) to the trigonometric cosine of the value(s).
      Returns:
      T; the modified T
    • cosh

      T cosh()
      Set the value(s) to the hyperbolic cosine of the value(s).
      Returns:
      T; the modified T
    • exp

      T exp()
      Set the value(s) to Euler's number e raised to the power of the value(s).
      Returns:
      T; the modified T
    • expm1

      T expm1()
      Set the value(s) to Euler's number e raised to the power of the value(s) minus 1 (e^x - 1).
      Returns:
      T; the modified T
    • log

      T log()
      Set the value(s) to the natural logarithm (base e) of the value(s).
      Returns:
      T; the modified T
    • log10

      T log10()
      Set the value(s) to the base 10 logarithm of the value(s).
      Returns:
      T; the modified T
    • log1p

      T log1p()
      Set the value(s) to the natural logarithm of the sum of the value(s) and 1.
      Returns:
      T; the modified T
    • pow

      T pow​(double x)
      Set the value(s) to the value(s) raised to the power of the argument.
      Parameters:
      x - double; the value to use as the power
      Returns:
      T; the modified T
    • signum

      T signum()
      Set the value(s) to the signum function of the value(s); zero if the argument is zero, 1.0 if the argument is greater than zero, -1.0 if the argument is less than zero.
      Returns:
      T; the modified T
    • sin

      T sin()
      Set the value(s) to the trigonometric sine of the value(s).
      Returns:
      T; the modified T
    • sinh

      T sinh()
      Set the value(s) to the hyperbolic sine of the value(s).
      Returns:
      T; the modified T
    • sqrt

      T sqrt()
      Set the value(s) to the correctly rounded positive square root of the value(s).
      Returns:
      T; the modified T
    • tan

      T tan()
      Set the value(s) to the trigonometric tangent of the value(s).
      Returns:
      T; the modified T
    • tanh

      T tanh()
      Set the value(s) to the hyperbolic tangent of the value(s).
      Returns:
      T; the modified T
    • inv

      T inv()
      Set the value(s) to the complement (1.0/x) of the value(s).
      Returns:
      T; the modified T