Metadata-Version: 2.1
Name: pyhss
Version: 0.0.3
Summary: A python package for hierarchically semiseparable matrix representation
Home-page: https://github.com/chenxinye/pyhss.git
Author: No name
Author-email: xinyechenai@gmail.com
Maintainer: No name
Maintainer-email: xinyechenai@gmail.com
License: MIT License
Platform: UNKNOWN
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development
Classifier: Topic :: Scientific/Engineering
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: Unix
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Description-Content-Type: text/markdown
License-File: LICENSE

# pyhss

## A python package for hierarchically semiseparable matrix representation

Hierarchically semiseparable (HSS) matrix representation is a subclass of hierarchical matrices (H-matrices), which allows fast matrix multiplication, Cholesky decomposition, and other matrix computations. The HSS matrix representation is a hierarchical representation that is based on a recursive row and column partitioning of the matrix. Each k-level HSS representation is associated with k+1 level HSS tree on which all blocks of HSS matrices including the whole matrix can be represented.  This package allows Python user to transform their matrix into HSS matrix representation seamlessly. 

### Install

Install pyhss simply by

```bash
pip install pyhss
```


### Usage

For b = Ax we can implement

```Python
from pyhss import hss
from pyhss import hss_matmul

A = np.random.randn(100, 100)
x = np.random.randn(100, 1)

hss_mat = hss(maxdepth=10).build(A)
b = hss_matmul(A, x)
print(LA.norm(b - np.dot(A, x), 2))
```


