# commons-user mailing list archives

##### Site index · List index
Message view
Top
From "Haswell, Joe" <josiah.d.hasw...@hp.com>
Subject RE: [MATH] Linear equation [A] [X] = [B] solution using Sparse Matrix
Date Wed, 08 Dec 2010 22:24:54 GMT
```You're right. Would you consider integrating and contributing your sparse solver?

Joe H. | HP Software

-----Original Message-----
From: Mike Zhou [mailto:mike.zhou@interpss.org]
Sent: Wednesday, December 08, 2010 3:14 PM
To: Commons Users List
Subject: Re: [MATH] Linear equation [A] [X] = [B] solution using Sparse Matrix

Joe,

It could be 50K x 50K, however, with only less than 1% non-zero elements.
For example, for a 2500x2500 sparse matrix, the following are my test
results:

- Common math LU decomposition 54 sec
- My own sparse matrix routine (Pure Java) 0.2 sec

Clearly, common math lib solves the matrix as a full matrix.

Thx, Mike

On Wed, Dec 8, 2010 at 4:50 PM, Haswell, Joe <josiah.d.haswell@hp.com>wrote:

> How large?  It's likely one of those pesky time-complexity things you run
> into sometimes =(
>
> Joe H.  | HP Software
>
> -----Original Message-----
> From: Mike Zhou [mailto:mike.zhou@interpss.org]
> Sent: Wednesday, December 08, 2010 2:49 PM
> To: Commons Users List
> Subject: [MATH] Linear equation [A] [X] = [B] solution using Sparse Matrix
>
> Hi,
>
> I am trying to use common math library to solve large-scale liner equation
> with sparse structure. Use the SpareRealMatrix interface
> and OpenMapRealMatrix implementation, I defined my matrix. Then using the
> LU
> decomposition,
>
> new LUDecompositionImpl(A).getSolver().solve(B)
>
> I could find the solution. However, the LU based solution seems to be very
> slow. I guess, it solves the sparse matrix as a full matrix.
>
> Question
>
> - Does the LUComposition implementation take full advantage of the sparse
> matrix structure
> - If yes, where I might be wrong?
>
> I am using common math lib 2.1.
>
> Thanks, Mike Zhou
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org