[eigen] ideas about the corner types |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: [eigen] ideas about the corner types
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Fri, 5 Feb 2010 02:11:06 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=42KLxjT17vHe505xzBn9SB73vVK8Kdyela6N3k7fe7Q=; b=sVd0dN71+/02XqNmL4Aw1Gb/38txtB6e+Ol+6YTriuChhAqeIm4fT6ERTOl7Yb2Bi6 ng7MseL1Qwk/5tJac19Dw1GTK96hPYtBoLtzAx/h53Pi4IIBplWUcEt0Xc4MHyzQYvpA BGPrhmHIjU1t3zkmDaSDCsS9mrR7FJqRJTL8U=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=unMEcnn4s24BY49+P4NHoX08T+/V8Vcf7J0PRySF+wsF9kbjXTmaXkd0Vg0g5nL/lu j/InEL6bpSbMDYNHAjXOm0aTWQUhByynjk3PcRdA0WMCftsaZppDbtHWUaEfAqvkRuyf Gwa0klv1Wy48iwj8/1wJ2W1LkjeJhp/4ssvMg=
Hi,
1)
Currently matrix.corner(TopLeft,3,3) takes TopLeft as a runtime
parameter. This is based around the assumption that the compiler
resolves this at compile time. In practice that seems to work although
I only checked GCC. Here's an idea to resolve this at runtime: let
TopLeft be an object of type CornerType<TopLeft_t>, etc.. taking a
common template CornerType type allows to write the function only
once, yet have a guarantee that that stuff resolves at compile time.
2)
Many times we just want the bottom N rows of a matrix. So why not
introducing Bottom, Top, etc... new corner types. Taking only one size
parameter instead of 2. That would make that stuff more elegant to use
in practice, more justified to exist (currently in many cases the
interest of that seems questionable).
Benoit