Skip to content

Commit

Permalink
Merge pull request #12 from gdalle/gd/prettify
Browse files Browse the repository at this point in the history
Prettify README and docs
  • Loading branch information
TimSiebert1 authored Jun 18, 2024
2 parents 95916dc + 4b9662f commit 05b4327
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 33 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# ADOLC.jl

[![Build Status](https://github.com/TimSiebert1/ADOLC.jl/actions/workflows/ci.yml/badge.svg)](https://github.com/TimSiebert1/ADOLC.jl/actions?query=branch%3Amaster)
[![Coverage Status](https://codecov.io/github/TimSiebert1/ADOLC.jl/coverage.svg?branch=master)](https://app.codecov.io/gh/timsiebert1/ADOLC.jl)
[![Dev docs](https://img.shields.io/badge/docs-dev-blue.svg)](https://TimSiebert1.github.io/ADOLC.jl/dev/)

**ADOLC.jl**
*A Julia wrapper of the automatic differentiation package ADOL-C*

This package wraps the C/C++ automatic differentiation library [ADOL-C](https://github.com/coin-or/ADOL-C) for use in [Julia](https://julialang.org/).
Expand Down
48 changes: 24 additions & 24 deletions docs/src/lib/derivative_modes.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
## Derivative Modes
# Derivative Modes



# First-Order
## First-Order
| Mode | Formula |
|:---------------:|:--------------------------:|
| jac | $$Df(x)$$ |
| jac_vec | $$Df(x)\dot{v}$$ |
| jac_mat | $$Df(x)\dot{V}$$ |
| vec_jac | $$\bar{z}^T Df(x)$$ |
| mat_jac | $$\bar{Z}^T Df(x)$$ |
| `:jac` | $$Df(x)$$ |
| `:jac_vec` | $$Df(x)\dot{v}$$ |
| `:jac_mat` | $$Df(x)\dot{V}$$ |
| `:vec_jac` | $$\bar{z}^T Df(x)$$ |
| `:mat_jac` | $$\bar{Z}^T Df(x)$$ |


# Second-Order
## Second-Order
| Mode | Formula |
|:------------------:|:-------------------------------:|
| hess | $$D^2f(x)$$ |
| hess_vec | $$D^2f(x) \dot{v}$$ |
| hess_mat | $$D^2f(x) \dot{V}$$ |
| vec_hess | $$\bar{z}^T D^2f(x)$$ |
| mat_hess | $$\bar{Z}^T D^2f(x)$$ |
| vec_hess_vec | $$\bar{z}^T D^2f(x) \dot{v}$$ |
| vec_hess_mat | $$\bar{z}^T D^2f(x) \dot{V}$$ |
| mat_hess_mat | $$\bar{Z}^T D^2f(x) \dot{V}$$ |
| mat_hess_vec | $$\bar{Z}^T D^2f(x) \dot{v}$$ |


# Abs-Normal-Form
| `:hess` | $$D^2f(x)$$ |
| `:hess_vec` | $$D^2f(x) \dot{v}$$ |
| `:hess_mat` | $$D^2f(x) \dot{V}$$ |
| `:vec_hess` | $$\bar{z}^T D^2f(x)$$ |
| `:mat_hess` | $$\bar{Z}^T D^2f(x)$$ |
| `:vec_hess_vec` | $$\bar{z}^T D^2f(x) \dot{v}$$ |
| `:vec_hess_mat` | $$\bar{z}^T D^2f(x) \dot{V}$$ |
| `:mat_hess_mat` | $$\bar{Z}^T D^2f(x) \dot{V}$$ |
| `:mat_hess_vec` | $$\bar{Z}^T D^2f(x) \dot{v}$$ |


## Abs-Normal-Form
| Mode | Formula |
|:------------------:|:-------------------------------:|
| abs_norm | $$\Delta f(x)$$ |
| `:abs_norm` | $$\Delta f(x)$$ |



Expand All @@ -45,7 +45,7 @@ and we want to compute the mixed-partials
```
leveraging the [`derivative`](@ref) driver. After defining the function `f` and the point for the derivative evaluation `x`, we have to select the format of the `partials`. There exist two options explained below that use `Vector{Int64}` to define a partial derivative.

# ADOLC-Format
## ADOLC-Format
The ADOLC-Format repeats the index $$i$$ of a derivative direction $$x_i$$ up to the derivative order of this index: $$\frac{\partial^4 f(x)}{\partial^4 x_3} \to [3, 3, 3, 3]$$. Additionally, the resulting vector is sorted descendent; if the vector's length is less than the total derivative degree, it is filled with zeros. The requested mixed-partials results in:
```math
[
Expand All @@ -55,7 +55,7 @@ The ADOLC-Format repeats the index $$i$$ of a derivative direction $$x_i$$ up to
]
```

# Partial-Format
## Partial-Format
The Partial-Format mimics the notation of the mixed-partial, as used above. The entry of the vector at index $$i$$ is the derivative degree corresponding to the derivative direction $$x_i$$. Therefore, `partials` is given as
```math
[
Expand All @@ -77,6 +77,6 @@ There are utilities to convert between the formats: [`partial_to_adolc_format`](



# Seed-Space
## Seed-Space

## Memory handling
3 changes: 3 additions & 0 deletions docs/src/lib/reference.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# API reference

```@meta
CollapsedDocStrings = true
```

```@docs
ADOLC.derivative
Expand Down
16 changes: 8 additions & 8 deletions docs/src/lib/wrapped_fcts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## List of wrapped ADOL-C drivers
# List of wrapped ADOL-C drivers

# TbadoubleModule
## TbadoubleModule

getValue
gradient
Expand Down Expand Up @@ -32,7 +32,7 @@
tensor_address
tensor_eval

# Abs-Smooth Utilities
## Abs-Smooth Utilities

enableMinMaxUsingAbs
get_num_switches
Expand All @@ -42,7 +42,7 @@
abs_normal


# Tape Utilities
## Tape Utilities

<< (in ADOL-C: <<=)
>> (in ADOL-C: =>>)
Expand All @@ -54,7 +54,7 @@



# TladoubleModule
## TladoubleModule

setNumDir(int const &n)
getValue()
Expand All @@ -63,23 +63,23 @@
setADValue(double const val, int const &i)


# Arithmethics
## Arithmethics

+
-
*
/
^

# Comparison
## Comparison

<
>
>=
<=
==

# Unary Functions
## Unary Functions

abs
sqrt
Expand Down

0 comments on commit 05b4327

Please sign in to comment.