Skip to content

Commit c082ef2

Browse files
committed
Added remaining documentation
1 parent b24800f commit c082ef2

7 files changed

Lines changed: 98 additions & 0 deletions

File tree

docs/guide/api/matlab/Dijkstra.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# `Dijkstra.m`
2+
3+
This code and associated function was written by Dimas Aryo. Full documentation can be found [here, on the Mathworks file exchange](https://www.mathworks.com/matlabcentral/fileexchange/36140-dijkstra-algorithm).
4+
5+
PathFinder uses [Dijkstra's shortest path algorithm](https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm) to find the shortest path as part of [shortestInfinitePath.m](shortestInfinitePath.md).
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# `PathFinder.m`
2+
3+
One of the two main functions. This function takes information about the oscillatory integral
4+
$$
5+
I = \int_\gamma f(z)\mathrm{e}^{\mathrm{i}\omega g(z)}\mathrm{d} z
6+
$$
7+
and returns an approximation to $I$. This is essentially a wrapper for the quadrature rule [PathFinderQuad.m](PathFinderQuad.md), which applies it to the integral with $f$.
8+
9+
```matlab
10+
I = PathFinder(a, b, f, phaseIn, freq, nPts, varargin)
11+
```
12+
13+
## Inputs
14+
* `a` and `b` are the endpoints of the integration contour $\gamma$.
15+
* `f` : A functon handle representation of $f(z)$. If left blank `f=[]`, then PathFinder assumes $f(z)=1$.
16+
* `phaseIn` : Coefficients of the polynomial phase function $g$.
17+
* `freq` : The frequency parameter $\omega$.
18+
* `nPts` : The number of quadrature points *per contour*.
19+
* `varargin` : This function takes many optional inputs, which can modify approximation parameters, and request plots. For more information, see [Usage](../../usage/index.md).
20+
21+
## Outputs
22+
* `z` : Nodes $z_j$.
23+
* `w` : Weights $w_j$.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# `PathFinderQuad.m`
2+
3+
One of the two main functions. This function takes information about the oscillatory integral
4+
$$
5+
I = \int_\gamma f(z)\mathrm{e}^{\mathrm{i}\omega g(z)}\mathrm{d} z
6+
$$
7+
and returns weights $w_j$ and nodes $z_j$ such that
8+
$$
9+
I \approx \sum_{j=1}^N f(z_j)w_j
10+
$$
11+
12+
```matlab
13+
[z,w] = PathFinderQuad(a, b, phaseIn, freq, nPts, varargin)
14+
```
15+
16+
## Inputs
17+
* `a` and `b` are the endpoints of the integration contour $\gamma$.
18+
* `phaseIn` : Coefficients of the polynomial phase function $g$.
19+
* `freq` : The frequency parameter $\omega$.
20+
* `nPts` : The number of quadrature points *per contour*.
21+
* `varargin` : This function takes many optional inputs, which can modify approximation parameters, and request plots. For more information, see [Usage](../../usage/index.md).
22+
23+
## Outputs
24+
* `z` : Nodes $z_j$.
25+
* `w` : Weights $w_j$.

docs/guide/api/matlab/addPaths.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# `addPaths.m`
2+
3+
This function should be run before PathFinder, and adds all necessary subdirectories to the Matlab search path.
4+
5+
```matlab
6+
addPaths()
7+
```
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# `compileAll.m`
2+
3+
This is a Matlab script which compiles all MEX functions required by PathFinder. For more information, see [Installation](../../setup/index.md).

docs/guide/api/matlab/files.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,8 @@ files:
44
- getRStar.md
55
- getSteepestExitsOnBall.md
66
- planBisection.md
7+
- shortestInfinitePath.md
8+
- PathFinder.md
9+
- PathFinderQuad.md
10+
- compileAll.md
11+
- addPaths.md
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# `shortestInfinitePath.m`
2+
3+
Chooses a suitable sequence of steepest descent and straight line contours, which correspond to a deformation of the original integration contour from $a$ to $b$. This is done by representing the key topological properties of known quantities as a graph, and then solving a shortest
4+
path problem.
5+
6+
Specifically, for this graph:
7+
balls, exits, entrances, endpoints and valleys are interpreted as nodes. Steepest descent contours (finite or infinite), and straight line contours connecting points inside balls, are represented as edges.
8+
The approach in this code is to create multiple adjacency matrices corresponding to the connections between different types of points (or
9+
valleys). These adjacency matrices are then combined, and we keep track
10+
of the different meanings of the different indices. This adjacency matrix
11+
is used to solve the shortest path problem.
12+
13+
For more information, see {cite:p}`PFpaper`.
14+
15+
```matlab
16+
[Q, graphData] = shortestInfinitePath(a, b, contours, balls, valleys, params)
17+
```
18+
19+
## Inputs
20+
21+
* `a` and `b` : The enepoindts of the original contour.
22+
* `contours` : An array of type [ContourSD.m](ContourSD.md)
23+
* `balls` : An array of type [Ball.m](Ball.md)
24+
* `valleys` : An array of valleys.
25+
* `params` : A struct of approximation parameters.
26+
27+
## Outputs
28+
29+
* `Q` : Struct of quadrature ingredients, which contains all of the information about the chosen path deformation. From this, quadrature points are subsequently constructed.
30+
* `graphData` : Simplified struct, used for plotting,.

0 commit comments

Comments
 (0)