/** {@inheritDoc} * @since 3.2 */ public DerivativeStructure exp() { final DerivativeStructure result = new DerivativeStructure(compiler); compiler.exp(data, 0, result.data, 0); return result; }
/** Compute power of a derivative structure. * @param x array holding the base * @param xOffset offset of the base in its array * @param y array holding the exponent * @param yOffset offset of the exponent in its array * @param result array where result must be stored (for * power the result array <em>cannot</em> be the input * array) * @param resultOffset offset of the result in its array */ public void pow(final double[] x, final int xOffset, final double[] y, final int yOffset, final double[] result, final int resultOffset) { final double[] logX = new double[getSize()]; log(x, xOffset, logX, 0); final double[] yLogX = new double[getSize()]; multiply(logX, 0, y, yOffset, yLogX, 0); exp(yLogX, 0, result, resultOffset); }
/** {@inheritDoc} * @since 3.2 */ public DerivativeStructure exp() { final DerivativeStructure result = new DerivativeStructure(compiler); compiler.exp(data, 0, result.data, 0); return result; }
/** {@inheritDoc} * @since 3.2 */ public DerivativeStructure exp() { final DerivativeStructure result = new DerivativeStructure(compiler); compiler.exp(data, 0, result.data, 0); return result; }
/** Compute power of a derivative structure. * @param x array holding the base * @param xOffset offset of the base in its array * @param y array holding the exponent * @param yOffset offset of the exponent in its array * @param result array where result must be stored (for * power the result array <em>cannot</em> be the input * array) * @param resultOffset offset of the result in its array */ public void pow(final double[] x, final int xOffset, final double[] y, final int yOffset, final double[] result, final int resultOffset) { final double[] logX = new double[getSize()]; log(x, xOffset, logX, 0); final double[] yLogX = new double[getSize()]; multiply(logX, 0, y, yOffset, yLogX, 0); exp(yLogX, 0, result, resultOffset); }
/** Compute power of a derivative structure. * @param x array holding the base * @param xOffset offset of the base in its array * @param y array holding the exponent * @param yOffset offset of the exponent in its array * @param result array where result must be stored (for * power the result array <em>cannot</em> be the input * array) * @param resultOffset offset of the result in its array */ public void pow(final double[] x, final int xOffset, final double[] y, final int yOffset, final double[] result, final int resultOffset) { final double[] logX = new double[getSize()]; log(x, xOffset, logX, 0); final double[] yLogX = new double[getSize()]; multiply(logX, 0, y, yOffset, yLogX, 0); exp(yLogX, 0, result, resultOffset); }