Skip to content

Commit 1a4eadb

Browse files
committed
Add a docstring for DynamicTransformationContext
1 parent 1c81bd6 commit 1a4eadb

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/transforming.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
"""
2+
struct DynamicTransformationContext{isinverse} <: AbstractContext
3+
4+
When a model is evaluated with this context, transform the accompanying `AbstractVarInfo` to
5+
constrained space if `isinverse` or unconstrained if `!isinverse`.
6+
7+
Note that some `AbstractVarInfo` types, must notably `VarInfo`, override the
8+
`DynamicTransformationContext` methods with more efficient implementations.
9+
`DynamicTransformationContext` is a fallback for when we need to evaluate the model to know
10+
how to do the transformation, used by e.g. `SimpleVarInfo`.
11+
"""
112
struct DynamicTransformationContext{isinverse} <: AbstractContext end
213
NodeTrait(::DynamicTransformationContext) = IsLeaf()
314

0 commit comments

Comments
 (0)