Boost logo

Boost :

From: jhrwalter (walter_at_[hidden])
Date: 2002-03-08 15:56:52


--- In boost_at_y..., "rwgk" <rwgk_at_y...> wrote:
> Is it possible to adapt the ublas expression templates to a
> custom container with an interface similar to that of
> std::vector? (I am mainly interested in adapting to a
> reference-counted container.)

Sure, IMO. One possibility is to use the array template argument of
numerics::vector (or numerics::matrix ;-) to adapt your own storage
container. The only known restriction of the current CVS version is,
that you don't have access via a data() member. This will change in
the next release (due to an earlier remark of Peter Schmitteckert).
 
Another way is to write your own adaptor class, see the packed matrix
adaptors for example.
 
> Is it possible to enable expression template array
> operations for a custom function foo() that operates on
> scalars?
 
You've lost me. Could you explain this requirement, please?

Regards
 
Joerg
 


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk