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 NDSparseArray.make(int[] dims, int[][] sub, double[] cof)
NDSparseArray NDSparseArray.make(int[] dims, long[] inst, double[] cof)
NDSparseArray NDSparseArray.make(Matrix m)

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 (double[]) – Values of nonzero elements. Array of coefficients corresponding to subscripts.

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

  • m (Matrix) – An initializing matrix.

Return

(NDSparseArray)