Subversion Repositories gelsvn

Rev

Rev 220 | Rev 230 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 220 Rev 222
Line 11... Line 11...
11
 
11
 
12
namespace Geometry
12
namespace Geometry
13
{
13
{
14
	Vec3d QEM::opt_pos(double sv_thresh) const
14
	Vec3d QEM::opt_pos(double sv_thresh) const
15
	{
15
	{
16
			// FIX ME - NOT CLEAR WHAT HAPPENS IN UNDERDETERMINDED CASE.
-
 
17
			CMatrix A_num(A);
16
			CMatrix A_num(A);
18
			CVector b_num(b);
17
			CVector b_num(b);
19
			CVector x(3);
18
			CVector x(3);
20
			x = LinearLSSolve(A,b);
19
			x = LinearLSSolve(A,b);
-
 
20
			/* Actually LSSolve uses SVD, but we cannot set a cut off value for
-
 
21
				 the singular values. Might be worth fixing */
21
			Vec3d p(-x[0], -x[1], -x[2]);
22
			Vec3d p(-x[0], -x[1], -x[2]);
22
			return p;
23
			return p;
23
	}
24
	}
24
 
25
 
25
}
26
}