A high-performance general-purpose compute library

Find the rank of the input matrix. More...

Functions

AFAPI unsigned rank (const array &in, const double tol=1E-5)
 C++ Interface for finding the rank of a matrix.
 
AFAPI af_err af_rank (unsigned *rank, const af_array in, const double tol)
 C Interface for finding the rank of a matrix.
 

Detailed Description

Find the rank of the input matrix.

This function uses af::qr to find the rank of the input matrix within the given tolerance.


Function Documentation

◆ af_rank()

AFAPI af_err af_rank ( unsigned *  rank,
const af_array  in,
const double  tol 
)

C Interface for finding the rank of a matrix.

Parameters
[out]rankwill contain the rank of in
[in]inis input matrix
[in]tolis the tolerance value

◆ rank()

AFAPI unsigned rank ( const array in,
const double  tol = 1E-5 
)

C++ Interface for finding the rank of a matrix.

Parameters
[in]inis input matrix
[in]tolis the tolerance value
Returns
the rank of the matrix