예제 #1
0
    def create(J, Z, normalization=None):
        def base(x, k):
            return np.cos(k * np.arccos(x)) * np.sqrt(2)**(k>0)

        return operator_from_matrix(Chebyshev, matrix_from_tensor_indices(J, Z, base, normalization))
예제 #2
0
    def create(J, Z, normalization=None):
        def base(x, k):
            return lpn_normalized(k, x) # * 1./np.sqrt(2)

        return operator_from_matrix(Legendre, matrix_from_tensor_indices(J, Z, base, normalization))
예제 #3
0
파일: Cos.py 프로젝트: jlbouchot/CSPDEs
    def create(J, Z, normalization=None):
        def base(x, k):
            return (1./np.sqrt(2))**np.count_nonzero(k==0) * np.cos(np.pi * x * k)

        return operator_from_matrix(Cos, matrix_from_tensor_indices(J, Z, base, normalization))