is a library callback function that creates an MSparseArray with dimensions dims given explicit positions pos and values vals and puts the result in .

Details and OptionsDetails
  • Used in C/C++ code in a library function called from Mathematica.
  • A nonzero error code value will be returned if there is not sufficient memory or inputs are not consistent.
  • The destination should either be null (0) or an MSparseArray object.
  • A new MSparseArray is created. If is not null, then the memory will be freed before creating the new result.
  • The positions pos should be a rank 2 MTensor with integer values.
  • The values vals should be a rank 1 tensor.
  • The first dimensions of pos and vals should be equal.
  • The length of dims should be equal to the second dimension of pos.
  • The implicit value imp should either be null (0) or a rank 0 MTensor having type consistent with the type of vals. If imp is null, the implicit value is taken to be 0.
  • Tutorials