Skip to content

Commit 16a2161

Browse files
authored
Feature/documentation improvements (#41)
* improve mrhs documentation * more clearly state observations are now matrix * try fix failing codecov with tarpaulin * try non-nightly tarpauling docker image
1 parent d550e64 commit 16a2161

File tree

4 files changed

+30
-4
lines changed

4 files changed

+30
-4
lines changed

.github/workflows/coverage.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,17 @@ jobs:
1414
name: coverage
1515
runs-on: ubuntu-latest
1616
container:
17-
image: xd009642/tarpaulin:develop-nightly
17+
# image: xd009642/tarpaulin:develop-nightly
18+
image: xd009642/tarpaulin
1819
options: --security-opt seccomp=unconfined
1920
steps:
2021
- name: Checkout repository
2122
uses: actions/checkout@v3
2223

2324
- name: Generate code coverage
2425
run: |
25-
cargo +nightly tarpaulin --force-clean --verbose --all-features --engine llvm --timeout 120 --out Lcov
26+
cargo tarpaulin --force-clean --verbose --all-features --engine llvm --timeout 120 --out Lcov
27+
# cargo +nightly tarpaulin --force-clean --verbose --all-features --engine llvm --timeout 120 --out Lcov
2628
2729
- name: upload to Coveralls
2830
uses: coverallsapp/github-action@master

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,5 @@ Cargo.lock
1919

2020
# ide folders
2121
.idea/
22+
23+
lcov.info

src/lib.rs

+23-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//!
99
//! ## Multiple Right Hand Sides
1010
//!
11-
//! Since version 0.8.0, support for global fitting with multiple right hand
11+
//! Since version 0.8.0, support for _global fitting_ with multiple right hand
1212
//! sides has been added to this library. This is a powerful technique for suitable
1313
//! problems and is explained at the end of this introductory chapter.
1414
//!
@@ -366,6 +366,28 @@
366366
//!
367367
//! To take advantage of global fitting we don't need to change anything about the
368368
//! model, we just have to make a slight modification to the way we build a problem.
369+
//! The crucial differences to the single right hand side case are:
370+
//!
371+
//! 1. We have to use the [`LevMarProblemBuilder::mrhs`](crate::solvers::levmar::LevMarProblemBuilder::mrhs)
372+
//! constructor rather than `new`.
373+
//! 2. We have to sort the right hand sides into a matrix, where each right
374+
//! hand side, which is a column-vector on its own, will become a column
375+
//! of the resulting matrix.
376+
//!
377+
//! For a set of observations `$\vec{y}_1,\dots,\vec{y}_S$` (column vectors) we
378+
//! now have to pass a _matrix_ `$Y$` of observations, rather than a single
379+
//! vector to the builder. As explained above, the resulting matrix would look
380+
//! like this.
381+
//!
382+
//! ```math
383+
//! \boldsymbol{Y}=\left(\begin{matrix}
384+
//! \vert & & \vert \\
385+
//! \vec{y}_1 & \dots & \vec{y}_S \\
386+
//! \vert & & \vert \\
387+
//! \end{matrix}\right)
388+
//! ```
389+
//!
390+
//! The order of the vectors in the matrix doesn't matter.
369391
//!
370392
//! ## Example
371393
//! ```no_run

src/solvers/levmar/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ where
159159
}
160160

161161
/// creata a new solver using the given underlying solver. This allows
162-
/// us to configure the underlying with non-default parameters
162+
/// us to configure the underlying solver with non-default parameters
163163
pub fn with_solver(solver: LevenbergMarquardt<Model::ScalarType>) -> Self {
164164
Self { solver }
165165
}

0 commit comments

Comments
 (0)