A high-performance general-purpose compute library

- Main Page
- Tutorials
- Release Notes
- Examples

Functions
rank
ArrayFire Functions | ArrayFire Functions by Category » Linear Algebra » Matrix operations

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

## Detailed Description

Find the rank of a 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 to find the rank of a matrix.

Parameters

  [out] | rank | rank
  [in] | in | input matrix
  [in] | tol | tolerance value

Returns
  AF_SUCCESS, if function returns successfully, else an af_err code is given

## ◆ rank()

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

C++ Interface to find the rank of a matrix.

Parameters

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

Returns
  rank