Skip to content

Commit 42452b4

Browse files
committed
Document
1 parent 27a60b9 commit 42452b4

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

docs/src/api.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,27 @@ SamplingContext
470470
DefaultContext
471471
PrefixContext
472472
ConditionContext
473+
InitContext
474+
```
475+
476+
### VarInfo initialisation
477+
478+
`InitContext` is used to initialise, or overwrite, values in a VarInfo.
479+
480+
To accomplish this, an initialisation _strategy_ is required, which defines how new values are to be obtained.
481+
There are three concrete strategies provided in DynamicPPL:
482+
483+
```@docs
484+
PriorInit
485+
UniformInit
486+
ParamsInit
487+
```
488+
489+
If you wish to write your own, you have to subtype [`DynamicPPL.AbstractInitStrategy`](@ref) and implement the `init` method.
490+
491+
```@docs
492+
DynamicPPL.AbstractInitStrategy
493+
DynamicPPL.init
473494
```
474495

475496
### Samplers

0 commit comments

Comments
 (0)