RE : [eigen] LinSpaced() API |
[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]
Hi, speaking of this method, it would be useful to have a LinSpace(low, high) version with increment of 1 between two numbers (maybe in this case the name would be Range) or more generaly something mimicking the start:end and start:incr:end. It would be especially useful to select rows/cols of a matrix... Adrien -------- Message d'origine-------- De: Listengine de la part de Hauke Heibel Date: jeu. 22/07/2010 14:06 À: eigen@xxxxxxxxxxxxxxxxxxx Objet : Re: [eigen] LinSpaced() API Done. On Thu, Jul 22, 2010 at 1:41 PM, Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx> wrote: > 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 >
<<winmail.dat>>
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |