/** Compute a<sup>x</sup> where a is a double and x a {@link DerivativeStructure} * @param a number to exponentiate * @param x power to apply * @return a<sup>x</sup> * @since 3.3 */ public static DerivativeStructure pow(final double a, final DerivativeStructure x) { final DerivativeStructure result = new DerivativeStructure(x.compiler); x.compiler.pow(a, x.data, 0, result.data, 0); return result; }
/** {@inheritDoc} * @since 3.2 */ public DerivativeStructure pow(final int n) { final DerivativeStructure result = new DerivativeStructure(compiler); compiler.pow(data, 0, n, result.data, 0); return result; }
/** {@inheritDoc} */ public DerivativeStructure reciprocal() { final DerivativeStructure result = new DerivativeStructure(compiler); compiler.pow(data, 0, -1, result.data, 0); return result; }
/** {@inheritDoc} * @since 3.2 */ public DerivativeStructure pow(final double p) { final DerivativeStructure result = new DerivativeStructure(compiler); compiler.pow(data, 0, p, result.data, 0); return result; }
/** {@inheritDoc} * @exception DimensionMismatchException if number of free parameters * or orders do not match * @since 3.2 */ public DerivativeStructure pow(final DerivativeStructure e) throws DimensionMismatchException { compiler.checkCompatibility(e.compiler); final DerivativeStructure result = new DerivativeStructure(compiler); compiler.pow(data, 0, e.data, 0, result.data, 0); return result; }
/** Perform division of two derivative structures. * @param lhs array holding left hand side of division * @param lhsOffset offset of the left hand side in its array * @param rhs array right hand side of division * @param rhsOffset offset of the right hand side in its array * @param result array where result must be stored (for * division the result array <em>cannot</em> be one of * the input arrays) * @param resultOffset offset of the result in its array */ public void divide(final double[] lhs, final int lhsOffset, final double[] rhs, final int rhsOffset, final double[] result, final int resultOffset) { final double[] reciprocal = new double[getSize()]; pow(rhs, lhsOffset, -1, reciprocal, 0); multiply(lhs, lhsOffset, reciprocal, 0, result, resultOffset); }
/** Compute a<sup>x</sup> where a is a double and x a {@link DerivativeStructure} * @param a number to exponentiate * @param x power to apply * @return a<sup>x</sup> * @since 3.3 */ public static DerivativeStructure pow(final double a, final DerivativeStructure x) { final DerivativeStructure result = new DerivativeStructure(x.compiler); x.compiler.pow(a, x.data, 0, result.data, 0); return result; }
/** Compute a<sup>x</sup> where a is a double and x a {@link DerivativeStructure} * @param a number to exponentiate * @param x power to apply * @return a<sup>x</sup> * @since 3.3 */ public static DerivativeStructure pow(final double a, final DerivativeStructure x) { final DerivativeStructure result = new DerivativeStructure(x.compiler); x.compiler.pow(a, x.data, 0, result.data, 0); return result; }
/** {@inheritDoc} * @since 3.2 */ public DerivativeStructure pow(final int n) { final DerivativeStructure result = new DerivativeStructure(compiler); compiler.pow(data, 0, n, result.data, 0); return result; }
/** {@inheritDoc} */ public DerivativeStructure reciprocal() { final DerivativeStructure result = new DerivativeStructure(compiler); compiler.pow(data, 0, -1, result.data, 0); return result; }
/** {@inheritDoc} * @since 3.2 */ public DerivativeStructure pow(final double p) { final DerivativeStructure result = new DerivativeStructure(compiler); compiler.pow(data, 0, p, result.data, 0); return result; }
/** {@inheritDoc} */ public DerivativeStructure reciprocal() { final DerivativeStructure result = new DerivativeStructure(compiler); compiler.pow(data, 0, -1, result.data, 0); return result; }
/** {@inheritDoc} * @since 3.2 */ public DerivativeStructure pow(final double p) { final DerivativeStructure result = new DerivativeStructure(compiler); compiler.pow(data, 0, p, result.data, 0); return result; }
/** {@inheritDoc} * @since 3.2 */ public DerivativeStructure pow(final int n) { final DerivativeStructure result = new DerivativeStructure(compiler); compiler.pow(data, 0, n, result.data, 0); return result; }
/** {@inheritDoc} * @exception DimensionMismatchException if number of free parameters * or orders do not match * @since 3.2 */ public DerivativeStructure pow(final DerivativeStructure e) throws DimensionMismatchException { compiler.checkCompatibility(e.compiler); final DerivativeStructure result = new DerivativeStructure(compiler); compiler.pow(data, 0, e.data, 0, result.data, 0); return result; }
/** {@inheritDoc} * @exception DimensionMismatchException if number of free parameters * or orders do not match * @since 3.2 */ public DerivativeStructure pow(final DerivativeStructure e) throws DimensionMismatchException { compiler.checkCompatibility(e.compiler); final DerivativeStructure result = new DerivativeStructure(compiler); compiler.pow(data, 0, e.data, 0, result.data, 0); return result; }
/** Perform division of two derivative structures. * @param lhs array holding left hand side of division * @param lhsOffset offset of the left hand side in its array * @param rhs array right hand side of division * @param rhsOffset offset of the right hand side in its array * @param result array where result must be stored (for * division the result array <em>cannot</em> be one of * the input arrays) * @param resultOffset offset of the result in its array */ public void divide(final double[] lhs, final int lhsOffset, final double[] rhs, final int rhsOffset, final double[] result, final int resultOffset) { final double[] reciprocal = new double[getSize()]; pow(rhs, lhsOffset, -1, reciprocal, 0); multiply(lhs, lhsOffset, reciprocal, 0, result, resultOffset); }
/** Perform division of two derivative structures. * @param lhs array holding left hand side of division * @param lhsOffset offset of the left hand side in its array * @param rhs array right hand side of division * @param rhsOffset offset of the right hand side in its array * @param result array where result must be stored (for * division the result array <em>cannot</em> be one of * the input arrays) * @param resultOffset offset of the result in its array */ public void divide(final double[] lhs, final int lhsOffset, final double[] rhs, final int rhsOffset, final double[] result, final int resultOffset) { final double[] reciprocal = new double[getSize()]; pow(rhs, lhsOffset, -1, reciprocal, 0); multiply(lhs, lhsOffset, reciprocal, 0, result, resultOffset); }