Constructor of multidimensional tensor in Quantics Tensor Train format [1][2].
Parameters: |
---|
Common interface for the construction of the approximation.
Parameters: |
|
---|
Used to get the Frobeniuos norm of the underlying data.
Return the shape of the folded tensor (list of lists)
Return the ndim of the original tensor
Return the shape of the original tensor
Return the shape of the base “base” shape of the tensor
Used to get the Frobeniuos norm of a subtensor of the underlying data.
Parameters: |
|
---|---|
Return np.ndarray Creal: | |
1-d array containing the filtered values belonging to the real tensor |
Interpolates the values of the QTTvec at arbitrary points, using the interpolation matrices Ms.
Parameters: |
|
---|---|
Returns: | QTTvec interpolation |
Return type: | QTTvec |
>>> from DABISpectralToolbox import DABISpectral1D as S1D
>>> Ms = [ S1D.LinearInterpolationMatrix(X[i],XI[i]) for i in range(d) ]
>>> is_sparse = [True]*d
>>> TTapproxI = TTapprox.interpolate(Ms,eps=1e-8,is_sparse=is_sparse)
Project the QTTvec onto a set of basis provided, using the Generalized Vandermonde matrices Vs and weights Ws.
Parameters: |
|
---|---|
Returns: | TTvec containting the Fourier coefficients |
Return type: | TTvec |
>>> from DABISpectralToolbox import DABISpectral1D as S1D
>>> P = S1D.Poly1D(S1D.JACOBI,(0,0))
>>> x,w = S1D.Quadrature(10,S1D.GAUSS)
>>> X = [x]*d
>>> W = [w]*d
>>> # Compute here the TTapprox at points X
>>> TTapprox = QTTvec(....)
>>> # Project
>>> Vs = [ P.GradVandermonde1D(x,10,0,norm=False) ] * d
>>> is_sparse = [False]*d
>>> TTfourier = TTapprox.project(Vs,W,eps=1e-8,is_sparse=is_sparse)
This is a non-injective function from the q indices to the global indices