Skip to content

Commit

Permalink
Added prefix and @prefix to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
torfjelde committed Oct 29, 2024
1 parent 9e0730f commit cc3af46
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/src/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ One can nest models and call another model inside the model function with [`@sub
@returned_quantities
```

In the context of nesting models, it's also useful to prefix the variables in sub-models to avoid variable names clashing:

```@docs
prefix(::DynamicPPL.Model, x)
@prefix
```

### Type

A [`Model`](@ref) can be created by calling the model function, as defined by [`@model`](@ref).
Expand Down

0 comments on commit cc3af46

Please sign in to comment.