GFLOAT loglllpotential() { GFLOAT ret = 0; int n = L.NumRows(); for (int i=1;i<=n;i++) { ret += log(gs.c[i]) * (n-i+1); } return ret; }
GFLOAT energy() { GFLOAT ret = 0; int n = L.NumRows(); for (int i=1;i<=n;i++) { ret += gs.cd[i]; } return ret; }
GFLOAT loghalfvolume() { GFLOAT ret = 0; int n = L.NumRows(); for (int i=1;i<=n/2;i++) { ret += log(gs.c[i]); } return ret; }
VEC& operator [] (int i) { if ((0<=i) && (i<L.NumRows())) { isNecessaryGSUpdate=true; return L[i]; } else { cout << "range_error: " << i << " size=" << dim << endl; exit(0); } }
void updateGSBasis_noapprox(int istart,int iend) { dim = L.NumRows(); memoryalloc(); istart = max(istart,GScomputed+1); if (istart < 1) istart = 1; if (iend > dim) iend = dim; for (int i=istart;i<=iend;i++) { computeGramSchmidtline(L,gs,i); } GScomputed = iend; }
inline void updateGSBasis_noapprox() { int n = L.NumRows(); GScomputed = 0; updateGSBasis_noapprox(1,n); }