Skip to content

Commit

Permalink
[documentation] Add an example with RandomizedPreconditioners.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison committed Oct 6, 2024
1 parent d730cb0 commit 1fa8e21
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 0 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ makedocs(
"Storage requirements" => "storage.md",
"Preconditioners" => "preconditioners.md",
"GPU support" => "gpu.md",
# "KrylovPreconditioners.jl" => "krylov_preconditioners.md",
"Warm-start" => "warm-start.md",
"Matrix-free operators" => "matrix_free.md",
"Callbacks" => "callbacks.md",
Expand Down
12 changes: 12 additions & 0 deletions docs/src/preconditioners.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,18 @@ N = ldl(F)
x, y, stats = tricg(A, b, c, M=M, N=N, ldiv=true)
```

```julia
using RandomizedPreconditioners, Krylov

= NystromSketch(A, k, r)

P = NystromPreconditioner(Â, μ)
x, stats = cg(A + μ*I, b; M=P)

P⁻¹ = NystromPreconditionerInverse(Â, μ)
x, stats = cg(A + μ*I, b; M=P⁻¹)
```

```julia
using SuiteSparse, Krylov
import LinearAlgebra.ldiv!
Expand Down

0 comments on commit 1fa8e21

Please sign in to comment.