diff --git a/simple.h b/simple.h index 068d127..d106bd1 100644 --- a/simple.h +++ b/simple.h @@ -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;