@@ -363,6 +363,13 @@ function Base.eltype(vi::AbstractVarInfo, spl::Union{AbstractSampler,SampleFromP
363
363
return eltype (T)
364
364
end
365
365
366
+ """
367
+ has_varnamedvector(varinfo::VarInfo)
368
+
369
+ Returns `true` if `varinfo` uses `VarNamedVector` as metadata.
370
+ """
371
+ has_varnamedvector (vi:: AbstractVarInfo ) = false
372
+
366
373
# TODO : Should relax constraints on `vns` to be `AbstractVector{<:Any}` and just try to convert
367
374
# the `eltype` to `VarName`? This might be useful when someone does `[@varname(x[1]), @varname(m)]` which
368
375
# might result in a `Vector{Any}`.
554
561
link([t::AbstractTransformation, ]vi::AbstractVarInfo, model::Model)
555
562
link([t::AbstractTransformation, ]vi::AbstractVarInfo, spl::AbstractSampler, model::Model)
556
563
557
- Transform the variables in `vi` to their linked space without mutating `vi`, using the transformation `t`.
564
+ Transform the variables in `vi` to their linked space without mutating `vi`, using the transformation `t`.
558
565
559
566
If `t` is not provided, `default_transformation(model, vi)` will be used.
560
567
573
580
invlink!!([t::AbstractTransformation, ]vi::AbstractVarInfo, model::Model)
574
581
invlink!!([t::AbstractTransformation, ]vi::AbstractVarInfo, spl::AbstractSampler, model::Model)
575
582
576
- Transform the variables in `vi` to their constrained space, using the (inverse of)
583
+ Transform the variables in `vi` to their constrained space, using the (inverse of)
577
584
transformation `t`, mutating `vi` if possible.
578
585
579
586
If `t` is not provided, `default_transformation(model, vi)` will be used.
0 commit comments