Skip to content

Commit

Permalink
Update docs. (#23)
Browse files Browse the repository at this point in the history
* Update docs

* Documenter 1.0
  • Loading branch information
ViralBShah authored Feb 9, 2024
1 parent 7c8757d commit 41327dd
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 4 deletions.
3 changes: 3 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"

[compat]
Documenter = "1"
8 changes: 6 additions & 2 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ using Documenter
using KLU

makedocs(
sitename = "KLU",
modules = [KLU],
sitename = "Interface to the KLU solver from SuiteSparse",
authors = "Raye Kimmerer, Viral B. Shah",
format = Documenter.HTML(),
modules = [KLU];
pages = ["KLU" => "index.md",
"Reference" => "functions_list.md"
],
warnonly = [:missing_docs, :cross_references],
)

Expand Down
10 changes: 10 additions & 0 deletions docs/src/functions_list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Functions

```@meta
CurrentModule = KLU
```

```@autodocs
Modules = [KLU]
Order = [:module, :type, :function]
```
44 changes: 43 additions & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,48 @@
# KLU.jl

Documentation for KLU.jl
This package wraps the [SuiteSparse KLU](https://github.com/DrTimothyAldenDavis/SuiteSparse) solver. A description from the publication:

KLU is a set of routines for solving sparse linear systems of equations. It is particularly well-suited to matrices arising in SPICE-like circuit simulation applications. It relies on a permutation to block triangular form (BTF), several methods for finding a fill-reducing ordering (variants of approximate minimum degree, and nested dissection), and a sparse left-looking LU factorization method to factorize each block.


## Installation
```julia
using Pkg
Pkg.add("KLU")
```

## Usage

```julia
julia> using KLU
julia> using SparseArrays
julia> A = sprand(15, 15, 0.45);
julia> factor = klu(A);
julia> b = rand(15);
julia> x = factor \ b
15-element Vector{Float64}:
22.501711574339556
27.80357152530039
-37.08488119597194
61.470604418791346
-0.49109038415655193
38.03163985997178
1.2417021657549396
-51.154984106483155
0.9488554483842341
1.587572050319512
-31.251127382496147
1.4508846663863602
-25.866070230462796
-5.46661465074706
10.688731342850245
```

## Citing this package

Please cite both [SuiteSparse](https://github.com/DrTimothyAldenDavis/SuiteSparse/blob/dev/CITATION.bib) as well as [KLU](https://github.com/JuliaSparse/KLU.jl/blob/main/CITATION.bib):

## Exported API

```@docs
klu
Expand Down
2 changes: 1 addition & 1 deletion src/KLU.jl
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ The individual components of the factorization `K` can be accessed by indexing:
The relation between `K` and `A` is
`K.L * K.U + K.F == K.Rs `\\` A[K.p, K.q]`
`K.L * K.U + K.F == K.Rs ` \\ ` A[K.p, K.q]`
`K` further supports the following functions:
Expand Down

0 comments on commit 41327dd

Please sign in to comment.