simple_fit.operator[]

This commit is contained in:
Jiri Pittner 2021-11-22 17:06:48 +01:00
parent 78efe19873
commit 999093c7dd

View File

@ -102,6 +102,7 @@ T fitcoef[n];
int npoints;
void clear(bool keepresults=false) {npoints=0; memset(&fitmat[0][0],0,n*n*sizeof(T)); memset(&rhsmat[0][0],0,1*n*sizeof(T)); if(!keepresults) memset(&fitcoef[0],0,n*sizeof(T));};
simple_linfit() {clear(false);}
const T &operator[](int i) const {return fitcoef[i];}
void input(const T (&funcs)[n], const T y)
{
++npoints;