Re: [eigen] eigen3 replacement of start/segment/end

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


I'm not familiar with Eigen2 but can the recently-introduced 
middleRows()/middleCols() functions in DenseBase.h replace Eigen2's 
segment()? (you will need to pull in the latest changesets).

-- Manoj


On Tuesday 20 July 2010 12:40:37 pm Keir Mierle wrote:
> Start and end have been renamed to head and tail.
>
> Keir
>
> On Tue, Jul 20, 2010 at 8:33 AM, Helmut Jarausch <
>
> jarausch@xxxxxxxxxxxxxxxxxxx> wrote:
> > Hi
> >
> > I have on old eigen2 function working with dense matrices
> >
> > template<typename Derived>
> >
> > void process(MatrixBase<Derived>& DATA) {
> >  Vector2d G;
> >  G << 1.0, 2.0;
> >
> >  DATA.template start<2>()+= G;    // fails in Eigen3
> >  DATA.template segment<2>(0)+= G;
> >
> > }
> >
> > How can this be upgraded to Eigen3.
> > Many thanks for a hint,
> > Helmut.
> >
> > --
> > Helmut Jarausch
> >
> > Lehrstuhl fuer Numerische Mathematik
> > RWTH - Aachen University
> > D 52056 Aachen, Germany




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