21 #ifndef __lfeat_math_h
22 #define __lfeat_math_h
34 static bool Normalize(
double* iVec,
int iLen);
39 template <
int LBound = -128,
int UBound = 127,
class TResult = double,
class TArg =
double>
43 explicit LUT (TResult (*f) (TArg),
double coeffadd = 0,
double coeffmul = 1)
46 for (
int i = LBound; i <= UBound; i++)
48 lut[i] = f(coeffmul * (i+coeffadd));
63 #endif //__lfeat_math_h
static bool SolveLinearSystem33(double *solution, double sq[3][3])
TResult lut_array[UBound-LBound+1]
static bool Normalize(double *iVec, int iLen)
LUT(TResult(*f)(TArg), double coeffadd=0, double coeffmul=1)
const TResult & operator()(int i) const