Re: [eigen] How to resize a partially fixed matrix

[ Thread Index | Date Index | More Archives ]

First of all the variant proposed:

>> So I'm strongly for your code change, but changing the assertion to

doesn't make me comfortable, again because a method that works for
(partially)dynamic matrices should also work on fixed-size matrices of
the same size, I am very reluctant here.

So here's what I did (changeset b030f9866bae):
    * add resize(int, NoChange) and resize(NoChange, int)
    * add missing assert in resize(int)
    * add examples for all resize variants
    * expand docs (part of which is from Tim Hutt's e-mail)

Now if you want we can add another name (or completely rename) the new
resize(int, NoChange) and resize(NoChange, int).
But perhaps it's good enough like this? i don't have a strong opinion.
resizeHoriz(size) and colwise().resize(size) look nice but they aren't
much shorter to type than resize(NoChange,size);


2009/6/24 Tim Hutt <tdhutt@xxxxxxxxx>:
> 2009/6/24 Markus Benjamin Fröb <grey_earl@xxxxxx>:
>> I don't see why the second case should work, since a) it's ambigous what the
>> user wanted and b) in the documentation it says explicitly "Of course, fixed-
>> size matrices can't be resized."
> I agree.

Mail converted by MHonArc 2.6.19+