|Re: [eigen] TopicCustomizingEigen|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] TopicCustomizingEigen
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Thu, 19 May 2011 09:31:04 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type:content-transfer-encoding; bh=9guxGBuh2Raet+B3pWKPma2M2G0nohiY/q99caaOt6M=; b=ZQSfXgH37bnb74hry68ZXT6EVJWotOtK/NWwjMq5ICHd1BMnjQFQEw2Hqq1OKh79AI 28SFM1DvaEUhME1Vlfug8vdTZYUYUSEwxar6u68ppF2KhU3oepl28u0kVq6uYTZPeMkv NaJxFdpKmTnx9O8jUbtWawKV9Gxy7mOwsb2AA=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=XTY2ryPC+iV/4FZdlVDQ3ceKHZ6JgOaB9VJAvuZGnMda/UwhatlhoDiTCi9CE9yRgl 4iBaTRuOyXzAv1ca5wOixJnL4s316Ei6LhTKKgav27OhT9FeUERb41IAr8ofipkaUjXn VtopQu9Q0JxD0uAAHL12eC7v/s9IwFpzv8xQA=
oops, indeed, this page is completely out of date :( The new way to
support custom types is to specialize XXX_impl structures, where XXX
is, e.g., sqrt, abs, real, etc.
Regarding nested, if your scalar type is heavy, you can use a reference, e.g.:
typedef T & Nested;
to reduce copies.
On Thu, May 19, 2011 at 12:47 AM, Bob Carpenter <carp@xxxxxxxxxxx> wrote:
> As I was extending Eigen for automatic differentiation,
> I was led to NumTraits through error messages and eventually
> found your customizing Eigen topic:
> The example looks to be a bit out of date, as the
> NumTraits example is missing the two enums:
> and doesn't mention the four methods I implemented,
> epsilon(), dummy_precision(), highest(), and lowest().
> I'm also not sure I'm using the Nested typedef properly -- I
> just followed your instructions in the doxygen doc to set it
> to the same as the template variable T.
> The doxygen page for NumTraits:
> is missing the "generated from the following file", which is odd,
> as NumTraits.h is where I expected to find it.
> - Bob Carpenter
> Columbia Uni, Dept. of Statistics