[eigen] conservative resize ...

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


just a short question regarding my recent commit for conservative
resizing. I added an option to allow the user to set the part by which
a matrix might be extended to zero - currently via a boolean.
Initially I wanted to offer the ability to pass the scalar value
explicity which lead to problems, in particular for integer matrices.

My initial intended interface was somethink like:

void conservativeResize(int,int) // matrices with uninitialized memory
void conservativeResize(int,int,Scalar value) // matrices with new
memory set to value
void conservativeResize(int) // vectors with uninitialized memory
void conservativeResize(int,Scalar value) // vectors with new memory set to zero

Here, the last and first definitions obviously clash when Scalar is int.

Do you have any proposal how to circumvent this problem. Do we need
the uninitialized version at all for conservativeResizing? Any use
case for this?

- Hauke

Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/