Rev 220 | Rev 230 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
#include <iostream>
#include "QEM.h"
#include "LinAlg/LapackFunc.h"
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_linalg.h>
using namespace LinAlg;
using namespace CGLA;
using namespace std;
namespace Geometry
{
Vec3d QEM::opt_pos(double sv_thresh) const
{
CMatrix A_num(A);
CVector b_num(b);
CVector x(3);
x = LinearLSSolve(A,b);
/* Actually LSSolve uses SVD, but we cannot set a cut off value for
the singular values. Might be worth fixing */
Vec3d p(-x[0], -x[1], -x[2]);
return p;
}
}