Skip to content

Commit

Permalink
Merge pull request #830 from stan-dev/avehtari-patch-1
Browse files Browse the repository at this point in the history
Update one-dimensional-integrals.qmd
  • Loading branch information
WardBrian authored Nov 13, 2024
2 parents 02828b0 + 430302c commit 0581d1b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/stan-users-guide/one-dimensional-integrals.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,11 @@ not a function of our parameters.
The function defining the integrand must have exactly the argument types and
return type of `normal_density` above, though argument naming is not important.
Even if `x_r` and `x_i` are unused in the integrand, they must be
included in the function signature. This may require passing in zero-length arrays
for data or a zero-length vector for parameters if the integral does not involve
data or parameters.
included in the function signature. Even if the integral does not involve some of these,
they must still be supplied some value. The most efficient will be a zero-length array
or vector, which can be created with rep_array(0, 0) and rep_vector(0, 0), respectively.
Other options include an uninitialized variable declared with size 0, which is equivalent
to the above, or any easy value, such as size 1 array created with {0}.

## Calling the integrator

Expand Down

0 comments on commit 0581d1b

Please sign in to comment.