uestla / Sparse-Matrix

C++ implementation of sparse matrix using CRS (Compressed Row Storage) format

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Operator[]

steenax86 opened this issue · comments

Hi there,

I just forked this repository.. It has a lot of potential. Are you thinking of explicitly storing zero elements through the the [] operator? Or would setting values through the []operator only be stored at nz locations after checking row/column indices?

Thanks in advance,
Steena

Hello.

I would like to have the operator[] for both setting and getting values (as stated in the Readme file).

The internal functionality would be the same as in the get() and set() methods. Is there any reason for storing zero values explicitely?

The only difference I see there is is that the getter operator[] will need some meta-structure for matrix row which will also have T operator[] getter.