This is the basic C++ program of C++ armadillo library which shows how to find psuedo inverse of the given matrix. It can be carried out by the help of inbuilt function "pinv" in armadillo library.
The computation is based on singular value decomposition
The tolerance argument is optional
The default tolerance is max(m,n)*max_sv*datum::eps, where:
m = number of rows and n = number of columns in A
max_sv = maximal singular value of A
datum::eps = difference between 1 and the least value greater than 1 that is representable
Any singular values less than tolerance are treated as zero
The method argument is optional; method is either "dc" or "std"
Comments