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

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

#include "inverse.h"
Include dependency graph for inverse.c:

Go to the source code of this file.

Functions

void ludcmp (UCFD_FLOAT *A)
 LU Decomposition function. More...
 
void lusub (UCFD_FLOAT *LU, UCFD_FLOAT *b)
 Forward/Backward substitution function. More...
 
void lusubmattrans (UCFD_FLOAT *LU, UCFD_FLOAT *B)
 Forward/Backward substitution for transposed matrix. 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 ( UCFD_FLOAT A)

LU Decomposition function.

Decompose matrix A into lower and upper triangular matrix

Definition at line 37 of file inverse.c.

Here is the caller graph for this function:

◆ lusub()

void lusub ( UCFD_FLOAT LU,
UCFD_FLOAT b 
)

Forward/Backward substitution function.

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

Definition at line 75 of file inverse.c.

Here is the caller graph for this function:

◆ lusubmattrans()

void lusubmattrans ( UCFD_FLOAT LU,
UCFD_FLOAT B 
)

Forward/Backward substitution for transposed matrix.

Parameters
LULU decomposed matrix
BRight-hand side matrix

Definition at line 105 of file inverse.c.

Here is the caller graph for this function: