Skip to content

Commit

Permalink
make some adjustments in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
FMatti committed Jun 11, 2024
1 parent c34b688 commit 4ced705
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ This project is based on the doctoral course [Advanced Scientific Programming in
Suppose you need to compute a basis of the Krylov subspace

$$
\mathcal{K}^{k}(\boldsymbol{A}, \boldsymbol{x}) = \mathrm{span}\left\{ \boldsymbol{x}, \boldsymbol{A}\boldsymbol{x}, \boldsymbol{A}^2\boldsymbol{x}, \dots, \boldsymbol{A}^{k-1}\boldsymbol{x} \right\}.
\mathcal{K}^{k}(\boldsymbol{A}, \boldsymbol{x}) = \mathrm{span}\big\{ \boldsymbol{x}, \boldsymbol{A}\boldsymbol{x}, \boldsymbol{A}^2\boldsymbol{x}, \dots, \boldsymbol{A}^{k-1}\boldsymbol{x} \big\}.
$$

We do this by running $k$ iterations of the Arnoldi method.
We do this by running $k$ iterations of the Arnoldi method:

```python
import numpy as np
Expand All @@ -38,7 +38,7 @@ x = np.random.randn(100) # Example starting vector
basis, _ = arnoldi.compute(A, x, k=10)
```

After $k$ iterations of the Arnoldi method you proceed with your computations, but realize your basis is not sufficient for these purposes. In these cases, _roughly_ makes it easy to "refine" the approximation with additional iterations.
After $k$ iterations of the Arnoldi method you proceed with your computations, but realize your basis is not sufficient for these purposes. In these cases, _roughly_ makes it easy to "refine" the approximation with additional iterations:

```python
refined_basis, _ = arnoldi.refine(k=10)
Expand All @@ -60,6 +60,14 @@ and then import it with
import roughly as rly
```

You can also test the package with [pytest](https://docs.pytest.org/en/8.2.x/) by running the command

```
pytest
```

in the root directory of the repository.

## Features

Most implementations in roughly also work for linear operator only available as function handles instead of matrices. Currently, roughly implements the Arnoldi, Lanczos, and blocked versions of them; the randomized SVD and Nyström approximation; the randomized range sketch; and the Girard-Hutchinson, subspace projection, and Hutch++ algorithms.

0 comments on commit 4ced705

Please sign in to comment.