//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller * @version 1.6 * @date Mon May 11 17:37:23 EDT 2020 * @see LICENSE (MIT style license file). */ package scalation //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** The `tenalgebra` package contains classes, traits and objects for tensors. */ package object tenalgebra { type Int2 = (Int, Int) type Ints = Array [Int] object Ints { def apply (is: Int*): Ints = Array (is :_*) } def comple (is: Ints, dim: Int): Ints = { val a = Array.ofDim [Int] (dim - is.size) var j, l = 0 for (i <- is) { while (j < i) { a(l) = j; j += 1; l += 1 } j += 1; } // for a } // comple } // tenalgebra package object