Table of Contents

NAME

QccMatrixInverse - matrix inverse

SYNOPSIS

#include "libQccPack.h"

int QccMatrixInverse(const QccMatrix matrix, QccMatrix matrix_inverse, int num_rows, int num_cols);

DESCRIPTION

QccMatrixInverse() calculates the inverse of matrix which must be square (i.e., num_rows = num_cols) and nonsingular.

The inverse is returned in matrix_inverse which must be a square matrix the same size as matrix allocated prior to calling QccMatrixInverse().

IMPLEMENTATION

The QccPack implementation of the matrix inverse is essentially a call to gsl_linalg_LU_decomp(3) to perform an LU decomposition followed by gsl_linalg_LU_invert(3) to conduct the actual inversion. These routines are part of the GNU Scientific Library (GSL). As a consequence, if GSL is not available, QccMatrixInverse() will not work.

gsl_linalg_LU_det(3) is used to calculate the determinant of the matrix to check for nonsingularity before calculating the inverse.

SEE ALSO

gsl_linalg_LU_decomp(3) , gsl_linalg_LU_invert(3) , gsl_linalg_LU_det(3) , QccMatrix(3) , QccPack(3)

AUTHOR

Copyright (C) 1997-2021 James E. Fowler


Table of Contents



Get QccPack at SourceForge.net. Fast, secure and Free Open Source software downloads