Commit 343a1652 authored by Laurent Belcour's avatar Laurent Belcour

Updating the rational fitters to use a faster precondtionner

for the SVD decomposition.
parent 61110402
......@@ -211,7 +211,7 @@ bool rational_fitter_cgal::fit_data(const vertical_segment* d, int np, int nq, i
#endif
// Update the ci column with the delta parameter
// (See Celis et al. 2007 p.12)
Eigen::JacobiSVD<Eigen::MatrixXd> svd(CI);
Eigen::JacobiSVD<Eigen::MatrixXd, Eigen::HouseholderQRPreconditioner> svd(CI);
const double sigma_m = svd.singularValues()(std::min(2*d->size(), np+nq)-1) ;
const double sigma_M = svd.singularValues()(0) ;
......
......@@ -212,7 +212,7 @@ bool rational_fitter_matlab::fit_data(const vertical_segment* d, int np, int nq,
// Update the ci column with the delta parameter
// (See Celis et al. 2007 p.12)
Eigen::JacobiSVD<Eigen::MatrixXd> svd(CI);
Eigen::JacobiSVD<Eigen::MatrixXd, Eigen::HouseholderQRPreconditioner> svd(CI);
const double sigma_m = svd.singularValues()(std::min(2*M, N)-1) ;
const double sigma_M = svd.singularValues()(0) ;
double delta = sigma_m / sigma_M ;
......
......@@ -225,7 +225,7 @@ bool rational_fitter_quadprog::fit_data(const vertical_segment* dat, int np, int
#endif
// Update the ci column with the delta parameter
// (See Celis et al. 2007 p.12)
Eigen::JacobiSVD<Eigen::MatrixXd> svd(eCI);
Eigen::JacobiSVD<Eigen::MatrixXd, Eigen::HouseholderQRPreconditioner> svd(eCI);
const double sigma_m = svd.singularValues()(std::min(2*d->size(), np+nq)-1) ;
const double sigma_M = svd.singularValues()(0) ;
......
......@@ -239,7 +239,7 @@ bool rational_fitter_quadproge::fit_data(const vertical_segment* dat, int np, in
#endif
// Update the ci column with the delta parameter
// (See Celis et al. 2007 p.12)
Eigen::JacobiSVD<Eigen::MatrixXd> svd(CI);
Eigen::JacobiSVD<Eigen::MatrixXd, Eigen::HouseholderQRPreconditioner> svd(CI);
const double sigma_m = svd.singularValues()(std::min(2*d->size(), np+nq)-1) ;
const double sigma_M = svd.singularValues()(0) ;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment