Boost logo

Ublas :

From: Michael Stevens (mail_at_[hidden])
Date: 2005-02-17 02:59:49


On Thursday 17 February 2005 08:01, Kresimir Fresl wrote:
> Michael Stevens wrote:
> > I think this is a good way to go. If you like the = syntax you can define
> > operator= (scalar_vector<double> v, double s)
> > {
> > v = scalar_vector<double> (v.size(), s);
> > }
> > A good compiler should turn this into efficient code.
>
> Unfortunately, operator=() must be a member function.
>
> fres

Blush Blush. It must have been late! That only leaves an ordinary named
function to do the job. Something like 'set' or 'set_scalar' would seem like
a nice name.

Michael
___________________________________
Michael Stevens Systems Engineering

Navigation Systems, Estimation and
                 Bayesian Filtering
    http://bayesclasses.sf.net
___________________________________