Boost logo

Ublas :

Subject: Re: [ublas] todo list
From: Jesse Perla (jesseperla_at_[hidden])
Date: 2010-07-24 17:14:32

Matwey V. Kornilov <matwey.kornilov <at>> writes:
> This is for memory economy. When we want to solve linear set Ax=y by means
> of SVD decomposition we write

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);