Go to the source code of this file.
Macros | |
#define | DO_INT_BRANCH(INTT) |
Functions | |
OCTAVE_EXPORT octave_value_list | Ffind (const octave_value_list &args, int nargout) j] |
template<typename T > | |
octave_value_list | find_nonzero_elem_idx (const Array< T > &nda, int nargout, octave_idx_type n_to_find, int direction) |
template<typename T > | |
octave_value_list | find_nonzero_elem_idx (const Sparse< T > &v, int nargout, octave_idx_type n_to_find, int direction) |
octave_value_list | find_nonzero_elem_idx (const PermMatrix &v, int nargout, octave_idx_type n_to_find, int direction) |
Variables | |
nd group nd example If two inputs are | ar {n} indicates the maximum number of elements to find from the beginning of the matrix or vector. If three inputs are given |
b = sparse (i, j, v, sz(1), sz(2)) | |
esult {} j = [ 1 | |
nd group nd example Note that this function is particularly useful for sparse as it extracts the nonzero elements as which can then be used to create the original matrix For | example |
nd group nd example If two inputs are | given |
nd group nd example If two inputs are requesting only the first or last respectively | However |
nd group nd example Note that this function is particularly useful for sparse | matrices |
nd group nd example If two inputs are requesting only the first or last respectively the indices are always returned in ascending order If two outputs are | ode {find} returns the row and column indices of nonzero elements of a matrix. For example: xample roup [i, j] = find (2 * eye (2)) esult{} i = [ 1 |
nd group nd example If two inputs are requesting only the first or last respectively the indices are always returned in ascending order If two outputs are | requested |
nd group nd example Note that this function is particularly useful for sparse as it extracts the nonzero elements as | vectors |
#define DO_INT_BRANCH | ( | INTT | ) |
OCTAVE_EXPORT octave_value_list Ffind | ( | const octave_value_list & | args, |
int | nargout | ||
) |
octave_value_list find_nonzero_elem_idx | ( | const Array< T > & | nda, |
int | nargout, | ||
octave_idx_type | n_to_find, | ||
int | direction | ||
) |
Definition at line 40 of file find.cc.
References Array< T >::dims(), Array< T >::find(), i, Array< T >::index(), Array< T >::isempty(), nargout(), Array< T >::numel(), retval, Array< T >::rows(), and Array< T >::xelem().
octave_value_list find_nonzero_elem_idx | ( | const Sparse< T > & | v, |
int | nargout, | ||
octave_idx_type | n_to_find, | ||
int | direction | ||
) |
Definition at line 87 of file find.cc.
References Sparse< T >::cidx(), Sparse< T >::cols(), Sparse< T >::data(), i, min(), nargout(), Sparse< T >::nnz(), Matrix::resize(), retval, Sparse< T >::ridx(), Sparse< T >::rows(), and val.
octave_value_list find_nonzero_elem_idx | ( | const PermMatrix & | v, |
int | nargout, | ||
octave_idx_type | n_to_find, | ||
int | direction | ||
) |
Definition at line 230 of file find.cc.
References PermMatrix::col_perm_vec(), PermMatrix::cols(), i, k, min(), nargout(), p, Matrix::resize(), retval, PermMatrix::rows(), and val.
Definition at line 388 of file find.cc.
Referenced by octave_nanosleep_wrapper().