Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
briochemc authored Nov 10, 2018
1 parent a752e57 commit 579c799
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@
</a>
</p>

This module overloads `factorize` and `\` to work with hyperdual-valued arrays.

It uses the HyperDualNumbers.jl package.
This package provides an overloaded `factorize` and `\` that work with hyperdual-valued arrays.

It uses of the hyper dual type defined by the [HyperDualNumbers.jl](https://github.com/JuliaDiff/HyperDualNumbers.jl) package.
The idea is that for a hyperdual-valued matrix

<a href="https://www.codecogs.com/eqnedit.php?latex=\fn_phv&space;M&space;=&space;A&space;&plus;&space;\varepsilon_1&space;B&space;&plus;&space;\varepsilon_2&space;C&space;&plus;&space;\varepsilon_1&space;\varepsilon_2&space;D" target="_blank"><img src="https://latex.codecogs.com/svg.latex?\fn_phv&space;M&space;=&space;A&space;&plus;&space;\varepsilon_1&space;B&space;&plus;&space;\varepsilon_2&space;C&space;&plus;&space;\varepsilon_1&space;\varepsilon_2&space;D" title="M = A + \varepsilon_1 B + \varepsilon_2 C + \varepsilon_1 \varepsilon_2 D" /></a>,
Expand All @@ -30,12 +29,15 @@ its inverse is given by
Therefore, only the inverse of <a href="https://www.codecogs.com/eqnedit.php?latex=\fn_phv&space;A" target="_blank"><img src="https://latex.codecogs.com/gif.latex?\fn_phv&space;A" title="A" /></a> is required to evaluate the inverse of <a href="https://www.codecogs.com/eqnedit.php?latex=\fn_phv&space;M" target="_blank"><img src="https://latex.codecogs.com/gif.latex?\fn_phv&space;M" title="M" /></a>.
This package makes available a `HyperDualFactors` type which containts the factors of <a href="https://www.codecogs.com/eqnedit.php?latex=\fn_phv&space;A" target="_blank"><img src="https://latex.codecogs.com/gif.latex?\fn_phv&space;A" title="A" /></a> and the non-real parts of <a href="https://www.codecogs.com/eqnedit.php?latex=\fn_phv&space;M" target="_blank"><img src="https://latex.codecogs.com/gif.latex?\fn_phv&space;M" title="M" /></a>, and overloads `factorize` to create an instance of `HyperDualFactors`, which can then be called with `\` to efficiently solve hyperdual-valued linear systems.

This package should be useful for evaluation of second derivatives of functions that use `\` (e.g., with iterative solvers).

## Usage

- Create your hyperdual-valued matrix `M`:
```julia
julia> M = A + ε₁ * B + ε₂ * C + ε₁ε₂ * D
```
(The `ε₁`, `ε₂`, and `ε₁ε₂` constants are defined for convenience here.)

- Factorize `M`:
```julia
Expand Down

0 comments on commit 579c799

Please sign in to comment.