|
Ublas : |
Subject: Re: [ublas] todo list
From: Matwey V. Kornilov (matwey.kornilov_at_[hidden])
Date: 2010-07-25 03:32:20
I would like this syntax for solving.
x = y / ublas::svd(A); // solve using SVD
x = y / ublas::cholesky(A); // solve using Cholesky ( but it is applied only
for positive-defined A )
x = y / ublas::sweep(A); // sweep method is for three-diagonal A
x = y / ublas::triangle(A); // when A is triangle
The same way we can obtain inverse matrix.
1. Consider first example. If matrix A is not of full rank there is a vector
space of solutions instead of single solution. The first common way is to
say that the matrix is bad enough. The second common way is to get any
solution with minimal norm (can be easily obtained when solving by means of
SVD). I need a way to tune behaviour of the solver.
2. Consider first example again. Imagine that due to rounding errors one of
the singular values is small enough. In this case the solver should assume
that it is zero.
3. Consider second example. We wrote there
x = C^{-1} (C^T)^{-1} y where A = C^T C
How to obtain ó^{-1} separately by means of the syntax? If A is covariance
matrix then C^{-1} is needed for weighting.
4. We can write
ublas::det( ublas::svd(A) ); // calculate determinant using SVD
ublas::min( ublas::svd(A) ); // find the minimal singular value (?)
5. ublas::svd ( ::cholesky, etc ) wrapper have to be implemented for using
in different cases with different input types ( matrix, sparse matrix,
matrix_slices and ranges, etc ). I think it is not easy without repeating
yourself.
Jesse Perla wrote:
> Matwey V. Kornilov <matwey.kornilov <at> gmail.com> writes:
> 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;