Zephyr Scientific Library (zscilib)
Functions
Limits

Min/max helpers to determine the range of the matrice's coefficients. More...

Functions

int zsl_mtx_min (struct zsl_mtx *m, zsl_real_t *x)
 Traverses the matrix elements to find the minimum element value. More...
 
int zsl_mtx_max (struct zsl_mtx *m, zsl_real_t *x)
 Traverses the matrix elements to find the maximum element value. More...
 
int zsl_mtx_min_idx (struct zsl_mtx *m, size_t *i, size_t *j)
 Traverses the matrix elements to find the (i,j) index of the minimum element value. If multiple identical minimum values are founds, the (i, j) index values returned will refer to the first element. More...
 
int zsl_mtx_max_idx (struct zsl_mtx *m, size_t *i, size_t *j)
 Traverses the matrix elements to find the (i,j) index of the maximum element value. If multiple identical maximum values are founds, the (i, j) index values returned will refer to the first element. More...
 

Detailed Description

Min/max helpers to determine the range of the matrice's coefficients.

Function Documentation

◆ zsl_mtx_max()

int zsl_mtx_max ( struct zsl_mtx m,
zsl_real_t x 
)

Traverses the matrix elements to find the maximum element value.

Parameters
mPointer to the zsl_mtz to traverse.
xThe maximum element value found in matrix 'm'.
Returns
0 if everything executed correctly, otherwise an appropriate error code.

Definition at line 1799 of file matrices.c.

◆ zsl_mtx_max_idx()

int zsl_mtx_max_idx ( struct zsl_mtx m,
size_t *  i,
size_t *  j 
)

Traverses the matrix elements to find the (i,j) index of the maximum element value. If multiple identical maximum values are founds, the (i, j) index values returned will refer to the first element.

Parameters
mPointer to the zsl_mtz to traverse.
iPointer to the row index of the maximum element value found in matrix 'm'.
jPointer to the column index of the maximum element value found in matrix 'm'.
Returns
0 if everything executed correctly, otherwise an appropriate error code.

Definition at line 1836 of file matrices.c.

◆ zsl_mtx_min()

int zsl_mtx_min ( struct zsl_mtx m,
zsl_real_t x 
)

Traverses the matrix elements to find the minimum element value.

Parameters
mPointer to the zsl_mtz to traverse.
xThe minimum element value found in matrix 'm'.
Returns
0 if everything executed correctly, otherwise an appropriate error code.

Definition at line 1783 of file matrices.c.

◆ zsl_mtx_min_idx()

int zsl_mtx_min_idx ( struct zsl_mtx m,
size_t *  i,
size_t *  j 
)

Traverses the matrix elements to find the (i,j) index of the minimum element value. If multiple identical minimum values are founds, the (i, j) index values returned will refer to the first element.

Parameters
mPointer to the zsl_mtz to traverse.
iPointer to the row index of the minimum element value found in matrix 'm'.
jPointer to the column index of the minimum element value found in matrix 'm'.
Returns
0 if everything executed correctly, otherwise an appropriate error code.

Definition at line 1815 of file matrices.c.