Subject: Re: [ublas] todo list
From: Paul Leopardi (paul.leopardi_at_[hidden])
Date: 2010-07-25 00:44:29
On Sunday 25 July 2010 07:40:41 Marco Guazzone wrote:
> On Sat, Jul 24, 2010 at 11:14 PM, Jesse Perla <jesseperla_at_[hidden]> wrote:
> > Let me throw out a crazy suggestion. ï¿½One cool thing about matlab is
> > overloading of the '\' operator. ï¿½You can then solve: A x = B
> > by writing:
> > x = B\A;
> > Can we do something like this overloading the '/' operator?
> > ï¿½matrix<double> A;
> > ï¿½vector<double> B;
> > ï¿½auto x = B / A;
> > And to solve in place:
> > ï¿½B /= A;
> > To specify different algorithms, you could add in tags around the rhs,
> > which could then be detected in the '/' overload and the appropriate
> > algorithm used.
> > auto x = B / ublas::svd(A);
> IMHO, I would avoid this type of overload since this is confusing for
> MATLAB users since MATLAB also have "/" which is different from "\".
> See here for "/"
> and here for "\"
Exactly. So if we decide to overload "/" it must work like Matlab's "/", *not*
like "\", and be properly documented so that I does not surprise its users in