Rosetta 3.3
Classes | Namespaces
src/basic/svd/SVD_Solver.hh File Reference

SVD solver class. More...

#include <platform/types.hh>
#include <utility/vector1.hh>
#include <ObjexxFCL/FArray2D.hh>
#include <ObjexxFCL/FArray1D.hh>

Classes

class  basic::svd::SVD_Solver

Namespaces

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.
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 fitted 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

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