rank

- Main Page
- Tutorials
- Functions
- Release Notes
- Examples

Functions
rank
Complete List of ArrayFire Functions ArrayFire Functions by Category » Linear Algebra » | Matrix operations

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. More...
AFAPI af_err | af_rank (unsigned *rank, const af_array in, const double tol)
| C Interface for finding the rank of a matrix. More...

## 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

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] | rank | will contain the rank of `in`
  [in] | in | is input matrix
  [in] | tol | is the tolerance value

AFAPI unsigned af::rank | ( | const array & | in,
|  | const double | tol = `1E-5`
| ) |  |

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

Parameters

  [in] | in | is input matrix
  [in] | tol | is the tolerance value

Returns
  the rank of the matrix

Examples:
  fft.cpp.