/// <summary> /// Compute composition of the instance by a univariate function. /// </summary> /// <param name="f">array of value and derivatives of the function at /// the current point (i.e. [f(<see cref="getValue()"/>), /// f'(<see cref="getValue()"/>), f''(<see cref="getValue()"/>)...]).</param> /// <returns>f(this)</returns> /// <exception cref="DimensionMismatchException"> if the number of derivatives /// in the array is not equal to <see cref="getOrder() order"/> + 1</exception> public DerivativeStructure compose(params double[] f) { if (f.Length != getOrder() + 1) { throw new DimensionMismatchException(f.Length, getOrder() + 1); } DerivativeStructure result = new DerivativeStructure(compiler); compiler.compose(data, 0, f, result.data, 0); return(result); }