Re: [eigen] LinSpaced() API

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


Hi Jitse,

I wrote those functions....

On Thu, Jul 22, 2010 at 1:13 PM, Jitse Niesen <jitse@xxxxxxxxxxxxxxxxx> wrote:
> I'm adding some bits to Tutorial page 5 (advanced initialization).

Thank you for doing this since I am hardly finding any time at the moment.

> While
> doing this, I noticed the order of the arguments for the static methods
> Constant() and LinSpaced() for vectors:
>
>   Constant(size, value)   versus   LinSpaced(low, high, size)
>
> I guess that the order of arguments for LinSpaced() mirrors the order for
> the Matlab function linspace. However, it does seem inconsistent when
> compared to the order of arguments for Constant(). I think that consistency
> within Eigen is more important than consistency with Matlab, so what about
> changing the order to LinSpaced(size, low, high)?

That's true and I am fine with switching. Last chance for breaking the
API, right?

> Additionally, I note that there is no fixed-size variant without the size
> argument. Is there any reason for that?

I cannot recall why I did not implement this. It should be simply to
add an overload. I can do both changes right now.

- Hauke



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