Skip to content
Nikolaj edited this page Jun 5, 2015 · 86 revisions

PySparse

ll_mat.c

In short

Last update: June 3rd, 2015

The next table gives a rough idea of what part of PySparse has been implemented in CySparse. Don't forget that CySparse is much more general and that other methods/functionalities were added to LLSparseMatrix.

Roughly speaking, there are 42 interesting routines defined in ll_mat.c, of which 33 are implemented (or existing code must be adapated to the new version with types).

This is roughly 79%

Table

Function ll_mat.c Function ll_mat.pyx Comments Done
PysparseIterator - Not needed for the moment 🆗
PysparseIterator_* - " 🆗
SpMatrix_LLMatBuildColIndex - We use CSC and CSR 🆗
SpMatrix_LLMatDestroyColIndex - " 🆗
SpMatrix_LLMatGetItem at, safe_at, __getitem__ Improved version + bound testing
SpMatrix_LLMatSetItem put, safe_put, __setitem__ Same + bound testing
SpMatrix_LLMatUpdateItemAdd update_ll_mat_item_ add_@index@_@type@ Idem
LLMat_Compress compress Idem
create_indexlist create_c_ array_ indices_from_ python_ object_@index@ More elaborate with arrays
copySubMatrix_FromList - Not needed, we use views 🆗
getSubMatrix_FromList - Not needed, we use views 🆗
clear_submatrix clear_submatrix Idem. PySparse has never exported this method...
setSubMatrix_FromList - Not needed, we use views 🆗
ll_matvec_kernel multiply_ ll_mat_ with_ numpy_vector_ kernel_@index@ _@type@ Idem
ll_matvec_kernel_stride multiply_ ll_mat_ with_ strided_ numpy_vector_ kernel_@index@ _@type@ Idem
ll_matvec_kernel_sym multiply_sym_ ll_mat_ with_ numpy_vector_ kernel_@index@_ @type@ Idem
ll_matvec_kernel_stride_sym multiply_ ll_mat_ with_ strided_ numpy_vector_ kernel_@index@_ @type@ Idem
ll_matvec_transp_kernel multiply_tranposed_ ll_mat_ with_ numpy_vector_ kernel_@index@_ @type@ Idem
ll_matvec_transp_kernel_stride multiply_tranposed_ ll_mat_ with_ with_ strided_ numpy_vector_ kernel_@index@_ @type@ Idem
LLMat_matvec_transp matvec_transp, A.T * b Idem + another method
LLMat_matvec matvec, A * b Idem + another method
LLMat_col_scale col_scale This is one place where SpMatrix_ LLMat Build Col Index might be handy
LLMat_row_scale row_scale
LLMat_to_csr to_csr Idem except column indices are not sorted
LLMat_to_sss - Not needed 🆗
LLMat_generalize generalize Idem
LLMat_export_mtx - was done before 🔸
LLMat_copy copy use of memcpy
LLMat_update_add_at - 🔴
LLMat_norm norm Works for symmetric matrices
LLMat_shift shift Idem
LLMat_keys keys Idem
LLMat_values values Idem
LLMat_items items Idem
LLMat_scale scale, A *= b Idem
LLMat_update_add_mask - 🔴
LLMat_update_add_mask_sym - 🔴
LLMat_take take_triplet Somewhat different
LLMat_put put_triplet Somewhat different
LLMat_delete_rows delete_rows_ with_mask Only int8 Numpy array for mask
LLMat_delete_cols - 🔴
LLMat_delete_rowcols - 🔴
LLMat_Find find Idem
LLMatType_dealloc __dealloc__
LLMatType_print print_to Idem but not satisfied 🔸
LLMatType_getattr use of properties and attributes directly No needed 🆗
LLMat_length - Do we need this?
LLMat_subscript - No needed , we use views 🆗
LLMat_ass_subscript - No needed, we use views 🆗
LLMat_as_mapping - No needed, we use views 🆗
LLMatType LLSparseMatrix 🆗
SpMatrix_NewLLMatObject __cinit__ 🆗
LLMat_from_mtx - Done before 🔸
helper_getCArrayObject - No needed 🆗
LLMat_from_csr - 🔴
LLMat_from_csc - 🔴
LLMat_dot multiply_ transposed_ ll_mat_ by_ ll_mat_ @index@_@type@, A.T * B, matdot_ transp Idem
LLMat_symdot - 🔴
LLMat_parse_index - No needed 🆗

Clone this wiki locally