Re: [eigen] ideas about the corner types |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] ideas about the corner types
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Fri, 5 Feb 2010 04:45:21 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=5jhigOTCWwppkeIFpkmKnmJsQCbLhpnrj/ZbrGm5ppQ=; b=blOCB2wg+cDydqeFWxT41MWDbOfwTvKJA7Hr4SzVK0YfPAhtISBkvFxOyC/nTfs5pC 66AUBXFoTW3Dwp1G4sL6IrN5iDY6hZYz+TQmStmJVJKZMCsK0VvtQdpmmqTBCJEmC193 ERr9J7httXUFZdtqrEcMBxQJN4tUDkYFYFMcc=
- 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; b=D88W68SvwOvYfBmkbxlF31G79v8UZVmifL6p3/1rcGE8WOObDd8T2f/GxqAGpioDe7 o8acg5C1DTbzQIiQjZUKAlhO/YJFKVNeyDePstMKEvRgH9g1C57szWQRCyiH7fStaJQ7 zaBofQv/9qoJvt98w2LMmXdLAfuwnAEAIVfTs=
2010/2/5 Gael Guennebaud <gael.guennebaud@xxxxxxxxx>:
>
>
> 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 ?
No API change, assuming that nobody was perverse enough to actually
pass a runtime variable, whose value actually isn't known at compile
time, as the corner type.
Benoit
>
>>
>> 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
>>
>>
>
>
>
>