Function matrix_lookup (o2scl)

O2scl : Function List

template<class mat_t>
void o2scl::matrix_lookup(size_t m, size_t n, const mat_t &A, double x0, size_t &i, size_t &j)

Lookup an element in the first $(m,n)$ entries in a matrix.

Return the location (i,j) of the element closest to x0.

template<class mat_t>
void o2scl::matrix_lookup(const mat_t &A, double x0, size_t &i, size_t &j)

Lookup an element in a matrix.

Return the location (i,j) of the element closest to x0.