def init_twoscale(self, k): hg = twoscalecoeffs(k) self.hg = Matrix(2 * k, 2 * k) self.hg0 = Matrix(2 * k, k) self.hg1 = Matrix(2 * k, k) self.hgT = Matrix(2 * k, 2 * k) for i in range(2 * k): for j in range(2 * k): self.hg[i, j] = hg[i][j] self.hgT[i, j] = hg[j][i] for i in range(2 * k): for j in range(k): self.hg0[i, j] = hg[i][j] self.hg1[i, j] = hg[i][j + k]
def init_twoscale(self,k): hg = twoscalecoeffs(k) self.hg = Matrix(2*k,2*k) self.hg0 = Matrix(2*k,k) self.hg1 = Matrix(2*k,k) self.hgT = Matrix(2*k,2*k) for i in range(2*k): for j in range(2*k): self.hg[i,j] = hg[i][j] self.hgT[i,j] = hg[j][i] for i in range(2*k): for j in range(k): self.hg0[i,j] = hg[i][j] self.hg1[i,j] = hg[i][j+k]
def writeascii(kmax, filename): file = open(filename, 'w') for k in range(1, kmax + 1): h0, h1, g0, g1 = twoscalecoeffs(k) writemat(k, file, h0) writemat(k, file, g0)
def writeascii(kmax,filename): file = open(filename,'w') for k in range(1,kmax+1): h0,h1,g0,g1 = twoscalecoeffs(k) writemat(k,file,h0) writemat(k,file,g0)