less squares 4 speed + fixed some bugs (but found more)
This commit is contained in:
@@ -29,6 +29,16 @@
|
||||
extern conf_t Conf;
|
||||
double nanotime();
|
||||
void getModData(mountdata_t *mountdata);
|
||||
typedef struct{
|
||||
double *x, *t, *t2, *xt; // arrays of coord/time and multiply
|
||||
double xsum, tsum, t2sum, xtsum; // sums of coord/time and their multiply
|
||||
size_t idx; // index of current data in array
|
||||
size_t arraysz; // size of arrays
|
||||
} less_square_t;
|
||||
|
||||
less_square_t *LS_init(size_t Ndata);
|
||||
void LS_delete(less_square_t **ls);
|
||||
double LS_calc_slope(less_square_t *l, double x, double t);
|
||||
|
||||
// unused arguments of functions
|
||||
#define _U_ __attribute__((__unused__))
|
||||
|
||||
Reference in New Issue
Block a user