Tensors

Tensors

TensorDec.tensorFunction.
tensor(w, Xi, V, d) -> Polynomial{true,T} 

Compute $∑ wᵢ (ξ_{i,1} V₁ + ... + ξ_{i,n} Vₙ)ᵈ$ where

  • Xi is a column-wise matrix of r points,
  • V is a vector of variables,
  • d is a degree.

Example

using TensorDec
X = @ring x0 x1 x2
w = rand(5)
Xi = rand(3,5)
tensor(w,Xi,X,4)
source
tensor(w, Xi, V, d) -> MultivariatePolynomial

Compute $∑ wᵢ Π_j(ξ_{i,j,1} V[j][1] + ... + ξ_{i,j,n_j} V[j][n_j])^d[j]$ where

  • Xi is a vector of matrices of points,
  • V is a vector of vectors of variables,
  • d is a vector of degrees.

Example

using TensorDec
X = @ring x0 x1 x2
Y = @ring y0 y1
w = rand(5)
Xi0 = rand(3,5)
Xi1 = rand(2,5)
tensor(w,[Xi0,Xi1],[X,Y],[4,2])
source
tensor(A, B, C) -> Array{K,3}

Compute the trilinear tensor $T=(∑_{l=1}^{length(w)} A[i,l]*B[j,l]*C[k,l])_{i,j,k}$.

source
tensor(w, A, B, C) -> Array{K,3}

Compute the trilinear tensor $T=(∑_{l=1}^{length(w)} w[l]*A[i,l]*B[j,l]*C[k,l])_{i,j,k}$.

source