Class DoubleMath

  • All Implemented Interfaces:
    Math<java.lang.Double>

    public class DoubleMath
    extends java.lang.Object
    implements Math<java.lang.Double>
    Provides mathematical operations on doubles. This is of course the most trivial implementation of the Math interface, since it simply delegates to the Math class. However, this is necessary to keep the the tensorics language generic for any scalar values.
    • Constructor Summary

      Constructors 
      Constructor Description
      DoubleMath()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Double pow​(java.lang.Double base, java.lang.Double exponent)
      Has to return the first argument raised to the power of the second argument.
      java.lang.Double root​(java.lang.Double base, java.lang.Double exponent)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DoubleMath

        public DoubleMath()
    • Method Detail

      • pow

        public java.lang.Double pow​(java.lang.Double base,
                                    java.lang.Double exponent)
        Description copied from interface: Math
        Has to return the first argument raised to the power of the second argument. This has to work for positive and negative exponents.
        Specified by:
        pow in interface Math<java.lang.Double>
        Parameters:
        base - the number which should be raised to the power.
        exponent - the exponent which shall be applied to the base.
        Returns:
        base^exponent
      • root

        public java.lang.Double root​(java.lang.Double base,
                                     java.lang.Double exponent)
        Specified by:
        root in interface Math<java.lang.Double>