R/Constr.R

Defines functions Tensor

Documented in Tensor

#' Creates an S3 class for a tensor
#' @param data Numeric numbers in the tensor
#' @param x, mode 1 dimension
#' @param y, mode 2 dimension
#' @param z, mode 3 dimension
#' @return S3 class tensor

Tensor <- function(data, x, y, z)
{
  structure(list(modes = c(x,y,z), data = array(data, c(x,y,z))), class = "TensorClass")
}

Try the TensorTools package in your browser

Any scripts or data that you put into this service are public.

TensorTools documentation built on Oct. 18, 2024, 1:07 a.m.