Boost LA

inverse

#include <boost/la/matrix_inverse.hpp>

namespace
boost
    {
    namespace
    la
        {
        //Only enabled if:
        //  is_matrix<A>::value &&
        //  matrix_traits<A>::rows==matrix_traits<A>::cols
        
        template <class A>
        typename deduce_matrix<A>::type
        inverse( A const & a, matrix_traits<A>::scalar_type det );
        
        template <class A>
        typename deduce_matrix<A>::type
        inverse( A const & a );
        }
    }

Preconditions:

det!=scalar_traits<typename matrix_traits<A>::scalar_type>::zero()

Returns:

Both overloads compute the inverse of a. The first overload takes the pre-computed determinant of a. The second overload computes the determinant automatically and throws zero_determinant_error if the computed determinant is zero.

Required access:

a:ir.