/** Update the high order scaled derivatives for Adams integrators (phase 1). * <p>The complete update of high order derivatives has a form similar to: * <pre> * r<sub>n+1</sub> = (s<sub>1</sub>(n) - s<sub>1</sub>(n+1)) P<sup>-1</sup> u + P<sup>-1</sup> A P r<sub>n</sub> * </pre> * this method computes the P<sup>-1</sup> A P r<sub>n</sub> part.</p> * @param highOrder high order scaled derivatives * (h<sup>2</sup>/2 y'', ... h<sup>k</sup>/k! y(k)) * @return updated high order derivatives * @see #updateHighOrderDerivativesPhase2(double[], double[], Array2DRowRealMatrix) */ public Array2DRowRealMatrix updateHighOrderDerivativesPhase1(final Array2DRowRealMatrix highOrder) { return update.multiply(highOrder); }
protected double[][] evaluate(double[][] d1, double[][] d2) throws EvaluationException{ Array2DRowRealMatrix first = new Array2DRowRealMatrix(d1); Array2DRowRealMatrix second = new Array2DRowRealMatrix(d2); try { MatrixUtils.checkMultiplicationCompatible(first, second); } catch (DimensionMismatchException e) { throw new EvaluationException(ErrorEval.VALUE_INVALID); } return first.multiply(second).getData(); } };
samplingMatrix = covMatEigenvectors.multiply(tmpMatrix);
/** Update the high order scaled derivatives for Adams integrators (phase 1). * <p>The complete update of high order derivatives has a form similar to: * <pre> * r<sub>n+1</sub> = (s<sub>1</sub>(n) - s<sub>1</sub>(n+1)) P<sup>-1</sup> u + P<sup>-1</sup> A P r<sub>n</sub> * </pre> * this method computes the P<sup>-1</sup> A P r<sub>n</sub> part.</p> * @param highOrder high order scaled derivatives * (h<sup>2</sup>/2 y'', ... h<sup>k</sup>/k! y(k)) * @return updated high order derivatives * @see #updateHighOrderDerivativesPhase2(double[], double[], Array2DRowRealMatrix) */ public Array2DRowRealMatrix updateHighOrderDerivativesPhase1(final Array2DRowRealMatrix highOrder) { return update.multiply(highOrder); }
@Override public Object doWork(Object first, Object second) throws IOException { if(null == first){ throw new IOException(String.format(Locale.ROOT,"Invalid expression %s - null found for the first value",toExpression(constructingFactory))); } if(null == second){ throw new IOException(String.format(Locale.ROOT,"Invalid expression %s - null found for the second value",toExpression(constructingFactory))); } Array2DRowRealMatrix realMatrix1 = getMatrix(first); Array2DRowRealMatrix realMatrix2 = getMatrix(second); Array2DRowRealMatrix realMatrix3 = realMatrix1.multiply(realMatrix2); return new Matrix(realMatrix3.getDataRef()); }
protected double[][] evaluate(double[][] d1, double[][] d2) throws EvaluationException{ Array2DRowRealMatrix first = new Array2DRowRealMatrix(d1); Array2DRowRealMatrix second = new Array2DRowRealMatrix(d2); try { MatrixUtils.checkMultiplicationCompatible(first, second); } catch (DimensionMismatchException e) { throw new EvaluationException(ErrorEval.VALUE_INVALID); } return first.multiply(second).getData(); } };
samplingMatrix = covMatEigenvectors.multiply(tmpMatrix);
samplingMatrix = covMatEigenvectors.multiply(tmpMatrix);