MATLAB APPLICATION DEPLOYMENT - WEB EXAMPLE GUIDE Guida Utente Pagina 306

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
Vedere la pagina 305
mwSize NumberOfNonZeros() const
Purpose Return num ber of nonzero elements for sparse array
C++
Syntax
#include "mclcppclass. h"
mwArray a(2, 2, mxDOUBLE_CLASS);
int n = a.NumberOfNonZeros ();// Should return 4
Arguments None
Return
Value
Actual number of n onzero elements in array.
Description Usethismethodtodeterminethesizeoftheofthearraysdata. If
the underlying array is not sparse, this returns the same value as
NumberOfElements().
Note This meth od does not analyze the actual values of the array
elements. Instead, it returns the number of elements that could
potentially be nonzero. This is exactly the number of elements for which
the sparse m atrix has allocated storage.
C-52
Vedere la pagina 305
1 2 ... 301 302 303 304 305 306 307 308 309 310 311 ... 353 354

Commenti su questo manuale

Nessun commento