Lqlsoftware / lib-b

A library of matrix factorization for Python 3.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LIB-B

A library contains implements of factorization supporting multiple methods and data types.

  • LU Factorization
  • Schmidt Decomposition (classical/modified)
  • Householder Reduction
  • Givens Reduction

Environment

Python 3.4 or higher

Install

pip install lib-b

Usage

# libb -h

Apply all decomposition on the matrix you input:

# libb lucsmshg

Usage in script

Import it:

import libb

Load matrix(from stdin or opened file):

A_matrix, row_num, col_num = libb.LoadMatrix(src=stdin)

Apply methods on matrix (any struct that supports index operator []) and fetch the result:

P, L, U = libb.LUFactorization(A=A_matrix)
Q, R = libb.ClassicalSchmidtDecomposition(A=A_matrix)
Q, R = libb.ModifiedSchmidtDecomposition(A=A_matrix)
Q, R = libb.HouseholderReduction(A=A_matrix)
Q, R = libb.GivensReduction(A=A_matrix)

About

A library of matrix factorization for Python 3.

License:GNU General Public License v3.0


Languages

Language:Python 100.0%