14.2.24 Class NDSparseArray


Representation of a sparse n-dimensional array.

Static members

NDSparseArray.make – Create a sparse n-dimensional matrix (tensor).

NDSparseArray.make(int[] dims, int[][] sub, float[] cof) -> NDSparseArray
NDSparseArray.make(int[] dims, int[] inst, float[] cof) -> NDSparseArray
NDSparseArray.make(Matrix m) -> NDSparseArray

Create a sparse n-dimensional matrix (tensor).

  • dims (int[]) – Dimensions.

  • sub (int[][]) – Positions of nonzeros. Array where each row is an \(n\)-dimensional index.

  • cof (float[]) – Values of nonzero elements. Array of coefficients corresponding to subscripts.

  • inst (int[]) – Positions of nonzeros using linear indexes into the array.

  • m (Matrix) – An initializing matrix.