Subversion Repositories gelsvn

Rev

Rev 207 | Blame | Compare with Previous | Last modification | View Log | RSS feed

#include <iostream>

#include "QEM.h"
#include "LinAlg/LapackFunc.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;
        }

}