Rev 214 | Rev 222 | 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
{
// FIX ME - NOT CLEAR WHAT HAPPENS IN UNDERDETERMINDED CASE.
CMatrix A_num(A);
CVector b_num(b);
CVector x(3);
x = LinearLSSolve(A,b);
Vec3d p(-x[0], -x[1], -x[2]);
return p;
}
}