Re: [eigen] TopicCustomizingEigen

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


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.

cheers,
gael

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:
>
> http://eigen.tuxfamily.org/api/TopicCustomizingEigen.html
>
> The example looks to be a bit out of date, as the
> NumTraits example is missing the two enums:
>
> RequireInitization
> HasFloatingPoint
>
> 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:
>
> http://eigen.tuxfamily.org/dox/structEigen_1_1NumTraits.html
>
> 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
>
>
>



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