Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
richfitz committed Oct 28, 2024
1 parent 6c6a947 commit a71025b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions vignettes/examples/sir.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
// [[dust2::class(sir)]]
// [[dust2::time_type(discrete)]]
// [[dust2::has_compare()]]
// [[dust2::parameter(I0)]]
// [[dust2::parameter(N)]]
// [[dust2::parameter(beta)]]
// [[dust2::parameter(gamma)]]
// [[dust2::parameter(exp_noise)]]
// [[dust2::parameter(I0, constant = FALSE)]]
// [[dust2::parameter(N, constant = TRUE)]]
// [[dust2::parameter(beta, constant = FALSE)]]
// [[dust2::parameter(gamma, constant = FALSE)]]
// [[dust2::parameter(exp_noise, constant = TRUE)]]
class sir {
public:
sir() = delete;
Expand Down
8 changes: 4 additions & 4 deletions vignettes/examples/sirode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
// [[dust2::class(sirode)]]
// [[dust2::time_type(continuous)]]
// [[dust2::has_compare()]]
// [[dust2::parameter(I0)]]
// [[dust2::parameter(N)]]
// [[dust2::parameter(beta)]]
// [[dust2::parameter(gamma)]]
// [[dust2::parameter(I0, constant = FALSE)]]
// [[dust2::parameter(N, constant = TRUE)]]
// [[dust2::parameter(beta, constant = FALSE)]]
// [[dust2::parameter(gamma, constant = FALSE)]]
class sirode {
public:
sirode() = delete;
Expand Down
2 changes: 1 addition & 1 deletion vignettes/writing.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ If we had wanted a continuous time system of ODEs we would have instead written:

and then later some of the rest of the code would be different; we will discuss this later.

The remaining annotations tell `dust2` about the parameters. It does not actually need to know about them, but this will be information that eventually we will surface in R so that you know what you can initialise the system with.
The remaining annotations tell `dust2` about the parameters. We use these to help communicate with the users of the system the inputs that generator accepts. These are really *documentation* rather than controlling how parameters are processed in the `build_shared` and `update_shared` methods described below, and it is up to you to keep them in sync. If you prefer, these could go directly above the code that handles each parameter. This information is surfaced to R via the `print` and `coef` methods of the generator and system objects.

```{r, echo = FALSE, results = "asis"}
i <- grep("dust2::parameter", annotations)
Expand Down

0 comments on commit a71025b

Please sign in to comment.