Hi,

I would like to iterate through the non-zero values in a RealVector object. I 
notice that the method RealVector.sparseIterator() can do this:

"Create a sparse iterator over the vector, which may omit some entries. The 
ommitted entries are either exact zeroes (for dense implementations) or are the 
entries which are not stored (for real sparse vectors). No guarantees are made 
about order of iteration."

However, the method returns an Iterator<RealVector.Entry> object, where "Entry" 
is a protected class and therefore I cannot really use it outside of the 
RealVector class.

Have I misunderstood something? Is there anyway to iterate through the values 
in the RealVector object without converting them to double[], because the 
vector is very high dimensional and very sparse.

Many thanks!

Reply via email to