Re: [eigen] ideas about the corner types

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




On Fri, Feb 5, 2010 at 8:11 AM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
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.

Sounds good, and that does not change the API right ?
 

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).

indeed, Bottom and Top are very useful too.
 

gael.


Benoit







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