Hi, All,

I am currently working on the SparseDoubleVector (HAMA-863) and found some
unclear places about the vector implementation.

1. What is the definition for a vector? According to the implementation, it
is implemented as elementwise sqrt. In such a case, problem will occur if
the one of the entry is negative.

2. Most of the operators are conducted on a copy of the current object. Do
we also need to provide a set of operators that directly modify the current
object itself? e.g. addOriginal, subtractOriginal, etc.

3. When a DenseDoubleVector operates with a SparseDoubleVector, what will
be the concrete type of the result object? A simple implementation is to
always return a SparseDoubleVector, even if it is dense. A complex
implementation is we maintain a sparsity ratio (the ratio of non-default
entries), if the ratio exceed a threshold, a DenseDoubleVector will be
returned.

4. Is the toArray method available for SparseDoubleVector? In my opinion,
it is better not to do that.


Regards,
Yexi

Reply via email to