From 999093c7dd6f9d8f240526101cbfd70bd772c55a Mon Sep 17 00:00:00 2001 From: Jiri Pittner Date: Mon, 22 Nov 2021 17:06:48 +0100 Subject: [PATCH] simple_fit.operator[] --- simple.h | 1 + 1 file changed, 1 insertion(+) 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;