Skip to content

Internal Documentation ​

Documentation for DistributionsInference's internal interface.

Contents ​

Index ​

Internal API ​

DistributionsInference._concrete_field_candidates Function
julia
_concrete_field_candidates(
    objtype,
    rows
) -> Vector{Tuple{Int64, Symbol, DataType}}

The estimated rows whose own struct field is concretely typed, precomputed once.

_concrete_field_candidates(objtype, rows) walks the estimated rows distribution_to_logdensity already derived at construction and keeps the (index, name, declared_type) triples the concrete-field-under-AD guard (#48) must check: index into the estimated flat vector, name the row's own struct field, declared_type that field's concrete type. A row with a dotted name (a nested structure this generic check does not introspect) or a non-concrete declared type is dropped, so a properly generic object gets an empty list and logdensity's per-evaluation guard is a single isempty check.

source