Boost logo

Ublas :

Subject: Re: [ublas] Types for arguments of user functions
From: Jesse Perla (jesseperla_at_[hidden])
Date: 2009-09-09 08:49:10

On Wed, Sep 9, 2009 at 8:46 AM, Jesse Perla <jesseperla_at_[hidden]> wrote:

> Note the use of the vec() instead of just vec now. The operator()
> overloads to return a reference to VectorT from the expression. (This is
> called the Barton-Nackman trick). I believe you could do the following to
> make the code a little cleaner if you have lots of operations:

Oops, sorry to get fancy. This is not the Barton-Nackman trick, but
something related using the Curiously Recurring Template Pattern... But the
idea above is correct.