On Wed, Jul 28, 2010 at 11:38 PM, Sergey Bochkanov
<sergey.bochka...@alglib.net> wrote:
>> My suggestion would be to support Sage vectors and matrices over
>> GF(2), RDF, and CDF (machine floats and complex numbers), as well as
>> numpy arrays and matrices of appropriate types.
>
> +1
>
> My proposal is to make
> * boolean vector/matrix = GF(2), RDF (non-zero = True)
> * integer vector/matrix = RDF
> * real = RDF
> * complex = CDF
>
>>> because ALGLIB uses Python's list-of-lists to store matrices, and Sage
>>> uses  its own matrix class. But only several functions from _alglib.py
>>> have to be fixed to work with Sage matrices/vectors:
>>> * safe_len/safe_cols/safe_rows
>>> * is_bool_vector/is_int_vector/is_real_vector/is_complex_vector
>>> * is_bool_matrix/is_int_matrix/is_real_matrix/is_complex_matrix
>>> * x_from_list/x_from_listlist
>
> Sorry, I've forgot to add several functions to this list:
> * bool_vector_from_x/bool_matrix_from_x
> * int_vector_from_x/int_matrix_from_x
> * real_vector_from_x/real_matrix_from_x
> * complex_vector_from_x/complex_matrix_from_x

But this raises another API question... should bool_matrix_from_x
return a matrix over GF(2) or over RDF?

(I'll start looking at the Sage -> ALGLIB direction for now.)

Carl

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to