UCFD_SPARSE  v1.0
Documentation
Loading...
Searching...
No Matches
inverse.c File Reference

Compute matrix inverse using LU Decomposition, and forward/backward substitution. More...

Go to the source code of this file.

Functions

void ludcmp (int n, double *A)
 LU Decomposition function. More...
 
void lusubst (int n, double *LU, double *b)
 Forward/Backward Substitution function. More...
 

Detailed Description

Compute matrix inverse using LU Decomposition, and forward/backward substitution.

======================================================================================================================

This file contains LU Decomposition function and substitution function.

         (1) LU Decomposition : ludcmp  
         Decompose the input matrix A by Lower/Upper triangular matrix.  
         A = LU  

         (2) Substitution : lusubst  
         Solve Ax = b by using forward/backward substitution.  
         Input vector `b` is overwritten with the solution vector `x`.  
Note
Input matrix must be the n-by-n square matrix, and Row-major format.
Each function treats target matrix as a one-dimensional array.
Author
Date
Nov 2024
Version
1.0
Copyright
Copyright (c) 2024, Namhyoung Kim and Jin Seok Park, Inha University, All rights reserved.
License
This project is release under the terms of the MIT License (see LICENSE file).

Definition in file inverse.c.

Function Documentation

◆ ludcmp()

void ludcmp ( int  n,
double *  A 
)

LU Decomposition function.

Decompose matrix A into lower and upper triangular matrix

Definition at line 34 of file inverse.c.

Here is the caller graph for this function:

◆ lusubst()

void lusubst ( int  n,
double *  LU,
double *  b 
)

Forward/Backward Substitution function.

This function performs Forward/Backward substitution of LU decomposed matrix.

Definition at line 73 of file inverse.c.

Here is the caller graph for this function: