API
VarNames
AbstractPPL.VarName
— TypeVarName{sym}(optic=identity)
A variable identifier for a symbol sym
and optic optic
.
The Julia variable in the model corresponding to sym
can refer to a single value or to a hierarchical array structure of univariate, multivariate or matrix variables. The field lens
stores the indices requires to access the random variable from the Julia variable indicated by sym
as a tuple of tuples. Each element of the tuple thereby contains the indices of one optic operation.
VarName
s can be manually constructed using the VarName{sym}(optic)
constructor, or from an optic expression through the @varname
convenience macro.
Examples
julia> vn = VarName{:x}(Accessors.IndexLens((Colon(), 1)) ⨟ Accessors.IndexLens((2, )))
x[:, 1][2]
diff --git a/v0.9.0/index.html b/v0.9.0/index.html
index 61608af..2b403db 100644
--- a/v0.9.0/index.html
+++ b/v0.9.0/index.html
@@ -457,5 +457,6 @@
});
+
AbstractPPL.jl
A lightweight package containing interfaces and associated APIs for modelling languages for probabilistic programming.
Settings
This document was generated with Documenter.jl version 1.7.0 on Tuesday 1 October 2024. Using Julia version 1.10.5.