commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Dunning <>
Subject Re: [MATH] Sparse Matrix - visiting all entries
Date Tue, 17 Aug 2010 14:24:40 GMT
Apache Mahout also has a matrix package with sparse matrix support.  In
particular, iterateNonZero is supported and there are multiple sparse
vector/matrix formats that provide different performance trade-offs.

Our purpose is not necessarily to be a general purpose math package and the
system is still somewhat in flux so there is a good chance that Mahout Math
isn't what you need.  On the other hand, because Mahout is much less mature,
changes are much easier to push through.  Commons Math has a fairly strict
back compatibility policy that means that changes such as you want can take
a very long time even for trunk.

On Tue, Aug 17, 2010 at 5:49 AM, Raviv Granot <>

> Hi,
> I see 2 implementations of sparse matrix in the math.commons.linear
> library.
> 1. OpenMapRealMatrix
> 2. SparseFieldMatrix
> Both are documented as "Sparse matrix implementation based on an open
> addressed map".
> Does anyone know what are the differences between the two? also, which
> method should I use to iterate only
> over the non zero elements? it seems that the WalkInRawOrder method runs
> over the entire row-length x col-length,
> the same as for RealMatrix.
> Thanks in advance!
> Raviv

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message