Constructor of the Spectral Tensor Train approximation [7]. Given a function f(x,theta,params):(Is, It) > R with dim(Is)=n and dim(It)=d, construct an approximation of g(theta,params): It > h_t(Is). For example Is could be the discretization of a spatial dimension, and It some parameter space, so that f(x,theta,params) describes a scalar field depending some parameters that vary in It. The params in the definition of f can be constants used by the function or othere objects that must be passed to the function definition.
Parameters: 


Note
For a description of the remaining parameters see TTvec.
Evaluate the surrogate on points x_in
Parameters:  x_in (np.ndarray) – 1 or 2 dimensional array of points in the parameter space where to evaluate the function. In 2 dimensions, each row is an entry, i.e. x_in.shape[1] == self.param_dim 

Returns:  an array with dimension equal to the space dimension (range_dim) plus one. If A is the returned vector and range_dim=2, then A[i,:,:] is the value of the surrogate for x_in[i,:] 
Compute the integral of the approximated function
Returns:  an array with dimension equal to the space dimension (range_dim), containing the value of the integral. 

Prepares the TTapprox from the generic_approx