Re: [eigen] eigen3 replacement of start/segment/end |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] eigen3 replacement of start/segment/end
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Wed, 21 Jul 2010 11:03:59 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=GdG8NFK8D0X9sM9uYSUa5nxuzHQUuWLdl+IGxmbeeDA=; b=soL+X84iyYn3ShtdKNegMszXCiZrRykFKQwpMWDFz5ba7OdiTYDJTFo+zaVHi5j9se hNjL6GvcJ0fLVS7WgzdFj2h11C0YHoQ0LQZcDMFBwvs5m2xadkSh+MmJPNgYTai8zZt6 AMo+leZx+5AYc9Py+NX6FBaI/3yqRHWE+wEPY=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=O+M/ms73kt3AyDvT9bO1Cak5VHylUTK0lWw02T83uXdabALyZSJBDTW7pDsIpIzsDh 4YWWKTJQ1Ufqbz5pKh9gCU1Ov7tq9TZjSACjhyWFv7DKOs3jxoJwioj3pwsPMz0KxO37 YywYqDixWiUcZZ6UtOhyIKLQoWxrmuevYgRpA=
2010/7/21 Manoj Rajagopalan <rmanoj@xxxxxxxxx>:
>
> 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).
They could, but segment() (which exists in eigen3 too) is still better
suited to the case of vectors because it allows you to not have to
care about the different between row-vector and column-vector. Plus,
its name is better suited to vectors.
Benoit
>
> -- 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
>
>
>
>