Re: [eigen] Matrix assignment |

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

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: Re: [eigen] Matrix assignment*From*: "Gael Guennebaud" <gael.guennebaud@xxxxxxxxx>*Date*: Tue, 21 Oct 2008 16:02:22 +0200*Dkim-signature*: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=ESgBWA0RjY1CGWchFOdnAxoHZbf/xzMfVkaYDFqkvN0=; b=oAVEnQRuviKPinm6ILAd2+7UuB2QoI9oJ9s6CA4UwTChDxXKka22GHfi1FDJq99BmY FRLnz98JwnymdsIQZC/yZplORuetpDb6Z+Csj0oZd/sfr4FuhGfGiL0fj+ajNKNx1iQd vk+Sx06cMBwoEQ6yfIhL52VoJesRwrCa4Xk0U=*Domainkey-signature*: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=MSd++aW/CYlWhiGzGPQzEnxsjwaLSFhYrtct4Mv5xa/fhMAhb0LcRR1XPoQi0zkVpk AIAxnKjcMlO0YEGPuhHWVcCoRk1V3wh94jQHxb1TnXFdIIWFv7aJPH0glh8Y0Ef9MDMt IKH7YFqOLFdiuz3Ryb2m9//Wf5+rruihwyFp8=

hm... resizeAssign sounds a bit weird to me. Perhaps with only one additional letter: m0.resizedAssign(m1); that can be interpreted as a shortcut for m0.resized().assign(m1);. Or, something much shorter and almost as explicit (IMO): m0.set(m1); I think it is quite clear that a "set" operation is allowed to resize the destination, isn't it ? another argument: when we allow the destination to be resized, that mean we are re-initializing the matrix, so "set" makes sense. gael. On Tue, Oct 21, 2008 at 2:35 PM, Benoît Jacob <jacob@xxxxxxxxxxxxxxx> wrote: > On Tuesday 21 October 2008 14:26:34 Benoît Jacob wrote: >> On Tuesday 21 October 2008 14:07:47 Cristóvão Sousa wrote: >> > Another solution that may be nice is to deny any resizing unless >> > you call some function, like: >> > >> > m0.copy(m1); >> > or >> > m0.assign() = m1; >> >> This could be called m0.resize() = m1; > > Another idea: > > note that here we don't need op-assign operators such as += -= *= /= because > these would never require a resizing. > > So in fact, aside from some syntax candy, a Resize proxy doesn't bring any > advantage. So perhaps it's just simpler to do: > > m0.resizeAssign(m1); > > (need confirmation from a native English speaker that it sounds OK. Need > an "And" in the middle?) > > Cheers, > Benoit > > --- > >

**Follow-Ups**:**Re: [eigen] Matrix assignment***From:*Benoît Jacob

**Re: [eigen] Matrix assignment***From:*Cristóvão Sousa

**References**:**[eigen] Matrix assignment***From:*Cristóvão Sousa

**Re: [eigen] Matrix assignment***From:*Cristóvão Sousa

**Re: [eigen] Matrix assignment***From:*Benoît Jacob

**Re: [eigen] Matrix assignment***From:*Benoît Jacob

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] Matrix assignment** - Next by Date:
**[eigen] Projection matrices in Eigen2** - Previous by thread:
**Re: [eigen] Matrix assignment** - Next by thread:
**Re: [eigen] Matrix assignment**

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