Re: [eigen] Indexes: why signed instead of unsigned? |
[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]
I've started doing these changes. I think that we only need to change runtime indices: for the template parameter indices, int should be good enough. That limits the amount of changes needed. See my current diff, in case you want to pick it up. Andrea: these changes will make it possible (even easy) to later add the ability for Sparse matrices to have a configurable Index type; but i'm not going to do this change myself as I have enough to do :) Benoit 2010/5/12 Andrea Arteaga <yo.eres@xxxxxxxxx>: > Just a word from my recent experience about sparse matrices: I think it > would be important to let the user decide the type of the indices. For dense > matrices it doesn't matter if the indices are signed or unsigned, 32 or 64 > bit, since the data structure does not contain data of this type (except for > two numbers for rows and cols); but sparse matrices have one array for data, > one for row indices and one for "column indices" (I'm talking about CRS > storage), i.e. two arrays are involved in this decision. > > I'm writing a library for interchanging data between C++ programs and > Matlab, and I'm providing support for Eigen and Boost::ublas. This kind of > problems are common in my work: having a template parameter to decide the > type of the indices would be very useful. > Andrea Arteaga
Attachment:
diff
Description: Binary data
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |