51 template <
typename Real>
56 Real coefficients[6]);
66 template <
typename Real>
75 template <
typename Real>
80 for (
int i = 0; i < numPoints; ++i)
82 Real
x = points[i][0];
83 Real
y = points[i][1];
113 A(0, 0) =
static_cast<Real
>(numPoints);
123 for (
int col = 0; col <
row; ++col)
125 A(row, col) = A(col, row);
129 Real invNumPoints = ((Real)1) /
static_cast<Real
>(numPoints);
132 for (
int col = 0; col < 6; ++col)
134 A(
row, col) *= invNumPoints;
148 template <
typename Real>
153 for (
int i = 0; i < numPoints; ++i)
155 Real
x = points[i][0];
156 Real
y = points[i][1];
176 A(0, 0) =
static_cast<Real
>(numPoints);
180 for (
int col = 0; col <
row; ++col)
182 A(row, col) = A(col, row);
186 Real invNumPoints = ((Real)1) /
static_cast<Real
>(numPoints);
189 for (
int col = 0; col < 4; ++col)
191 A(
row, col) *= invNumPoints;
200 Real inv = ((Real)1) / evector[3];
201 Real coefficients[3];
204 coefficients[
row] = inv * evector[
row];
207 circle.
center[0] = ((Real)-0.5) * coefficients[1];
208 circle.
center[1] = ((Real)-0.5) * coefficients[2];
gte::BSNumber< UIntegerType > abs(gte::BSNumber< UIntegerType > const &number)
void GetEigenvector(int c, Real *eigenvector) const
GLfixed GLfixed GLfixed y2
GLfixed GLfixed GLint GLint GLfixed points
Real GetEigenvalue(int c) const
GLenum GLenum GLsizei void * row
unsigned int Solve(Real const *input, int sortType)
DualQuaternion< Real > Dot(DualQuaternion< Real > const &d0, DualQuaternion< Real > const &d1)
Real operator()(int numPoints, Vector2< Real > const *points, Real coefficients[6])
Real operator()(int numPoints, Vector2< Real > const *points, Circle2< Real > &circle)