Skip to contents

A context stores compiled model/runtime state only. Behavioral data are prepared separately with `prepare_data()` and supplied to `log_likelihood()`.

Usage

make_context(structure, prep = NULL)

Arguments

structure

Finalized model structure.

prep

Optional preprocessed model bundle.

Value

An `accumulatr_context` object.

Examples

spec <- race_spec()
spec <- add_accumulator(spec, "A", "lognormal")
spec <- add_outcome(spec, "A_win", "A")
structure <- finalize_model(spec)
make_context(structure)
#> $cpp
#> $cpp$native
#> <pointer: 0x14b797280>
#> 
#> $cpp$observed_identity
#> [1] TRUE
#> 
#> $cpp$identity_backend
#> [1] "exact"
#> 
#> 
#> $required_p_slots
#> [1] 2
#> 
#> attr(,"class")
#> [1] "accumulatr_context"