PythonOptimizers / cysparse

Python/Cython library to replace PySparse
http://PythonOptimizers.github.io/cysparse
7 stars 3 forks source link

Introduce SparseMatrix matrices in place of NumPy matrices #205

Open ghost opened 9 years ago

ghost commented 9 years ago

For the moment, we only accept NumPy ndarray as right member for the solvers. This means that we only use dense matrices for the right members. Some solvers (for instance SPQR and SuiteSparse in general) have special methods for sparse right members. We could use them.

What do you think? @dpo @syarra

syarra commented 9 years ago

It is a good idea to use the sparse RHS solve methods.

I have already implemented sparse right hand sides for MUMPS and QR_MUMPS. I have 2 methods: - one for a CySparse CSRSparseMatrix,

On 11/09, Nikolaj wrote:

For the moment, we only accept NumPy ndarray as right member for the solvers. This means that we only use dense matrices for the right members. Some solvers (for instance SPQR and SuiteSparse in general) have special methods for sparse right members. We could use them.

What do you think? @dpo @syarra

--- Reply to this email directly or view it on GitHub: https://github.com/Funartech/cysparse/issues/205

ghost commented 9 years ago

Yep, totally agree and you are ahead! ;-)

ghost commented 9 years ago

By the way, do you use the same signature for both matrices? Or you define two different methods in Python? I think that we should use the same method and dispatch with specialized sub-methods.

syarra commented 9 years ago

I use the same solve method for both cases. I just test the number of arguments supplied by the user and dispatch to a solve_sparse and solve_dense method depending on the input.

ghost commented 9 years ago

Perfect! On Nov 10, 2015 11:03 AM, "Sylvain" notifications@github.com wrote:

I use the same solve method for both cases. I just test the number of arguments supplied by the user and dispatch to a solve_sparse and solve_dense method depending on the input.

— Reply to this email directly or view it on GitHub https://github.com/Funartech/cysparse/issues/205#issuecomment-155465516.