[ojAlgo-user] Concurrently solving equation systems
Mathematics, linear algebra and optimisation
Brought to you by:
apete
From: Anders P. <ap...@op...> - 2007-07-18 14:01:37
|
I've added a method that calls compute() and solve() in turn on a MatrixDecomposition, in a separate thread. The task is added to an executor queue and dealt with on any available CPU (core). If you have many (a constant flow of) equation systems to solve and a computer with more than one CPU this can speed things up significantly. Roughly speaking you can do one compute/solve per available CPU simultaneously. /Anders /** * Will solve [aBody][X]=[aRHS] concurrently by first calling * {@link #compute(MatrixStore)} using [aBody], and then * {@link #solve(MatrixStore)} using [aRHS]. If either of the input [aBody] * or [aRHS] is set to null the corresponing calculation is skipped. * * @param aBody The equation system body * @param aRHS The equation system right hand side * @return The matrix decomposition and the equation system solution, [X] */ Future<Result<N>> solve(MatrixStore<N> aBody, MatrixStore<N> aRHS); |