14.2.25 Class NDSparseArray

mosek.fusion.NDSparseArray

Representation of a sparse n-dimensional array.

Static members

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

NDSparseArray.make
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).

Parameters
  • 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.

Return

(NDSparseArray)