LibraryLink`
LibraryLink`MNumericArray_getData (C 関数)
MNumericArrayのデータ要素の配列へのvoidポインタを取得する.
例題
例 (1)
MNumericArray A;
numericarray_data_t type;
unsigned char* data;
mint i, len;
...
len = libData->numericarrayLibraryFunctions->MNumericArray_getFlattenedLength(A);
type = libData->numericarrayLibraryFunctions->MNumericArray_getType(A);
if (type == MNumericArray_Type_Ubit8) {
data = (unsigned char*)(libData->numericarrayLibraryFunctions->MNumericArray_getData(A));
for (i = 0; i < len; i++) {
unsigned char elem = data[i];
...
}
}