Rosetta  2016.11
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Namespaces
SVD_Solver.cc File Reference

SVD solver class `. More...

#include <basic/svd/SVD_Solver.hh>
#include <ObjexxFCL/FArray1D.hh>
#include <ObjexxFCL/FArray2D.hh>
#include <ObjexxFCL/Fmath.hh>
#include <algorithm>
#include <cmath>
#include <platform/types.hh>
#include <string>
#include <utility/exit.hh>
#include <utility/vector1.hh>
#include <utility/vectorL.hh>
#include <vector>

Namespaces

 basic
 Tags used to tag messeges sent by MPI functions used to decide whether a slave is requesting a new job id or flagging as job as being a bad input.
 
 basic::svd
 

Detailed Description

SVD solver class `.

Solve over-determined set of linear equation to minimize ||A x - b||^2, using Singular Value Decomposition (SVD) method.

Parameters
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.
Returns
The score of the fitting : sqrt( ||A x - b||^2 ) with run_score_svd_on_matrix(); The fited vector x with get_svd_solution();
Remarks
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.
References:

Christophe Schmitz & Srivatsan Raman