#looks for smallest determinants of the Psi matrix for irregular sampling #vertices are shifted to the various neighbors (of a given level) of the vertex they should b read "itall.txt": with(LinearAlgebra); mindet:=proc(T,lvl,funclist,listverts,tol) local l, m, n, d, oldlow, cycles, lowdet,i,j,k, newlist, tmpverts; make_neighbors(T,lvl,T[lvl,-1]); l:=nops(listverts); newverts:=listverts; m:=Matrix([seq([seq(T[newverts[i],funclist[j]],j=1..l)],i=1..l)]); lowdet:=abs(Determinant(m)); cycles:=0; oldlow:=lowdet+10*tol; while (lowdet < oldlow - tol) do oldlow:=lowdet; for i from 1 to l do for j from 0 to 4 do tmpverts:=subsop(i=T[listverts[i],j],newverts); m:=Matrix([seq([seq(T[tmpverts[n],funclist[k]],k=1..l)],n=1..l)]); d:=abs(Determinant(m)); if (d