Rosetta 3.3
src/basic/svd/ File Reference

SVD solver class `. More...

#include <basic/svd/SVD_Solver.hh>
#include <utility/vector1.hh>
#include <utility/exit.hh>
#include <ObjexxFCL/Fmath.hh>
#include <iostream>


namespace  basic
namespace  basic::svd

Detailed Description

SVD solver class `.

Detailed: Solve over-determined set of linear equation to minimize ||A x - b||^2, using Singular Value Decomposition (SVD) method.
Specifythe size of the problem in the constructor (M is the number of equations, N is the number of parameters to fit) M MUST be larger or equal than N. Use the set_* functions to set the data vector b and the matrix A. Use the run_* functions in the correct order to solve your system (run_decomp_svd, then run_solve_svd) You can score the result with run_score_svd_on_matrix You can retrieve your solution with get_svd_solution.
The score of the fitting : sqrt( ||A x - b||^2 ) with run_score_svd_on_matrix(); The fited vector x with get_svd_solution();
Calls in a wrong order of the functions will abort the program (i.e. if you try to solve the problem before you set a matrix A) Once the matrix is decomposed, you can change the vector b and solve Ax=b with the new vector. (That's why those 2 functions are separated) The matrix A is necessary to calculate the score (argument of run_score_svd_on_matrix), but the matrix A is not stored within the SVD_solver object, so make sure you have it available when scoring (this is done on purpose for speed up) Is it possible to speed up calculations by using FArraynD.index() call? ObjexxFCL doc is not really clear.

Christophe Schmitz & Srivatsan Raman

Last Modified: February 2010
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines