|double(*||constraint )(apop_data *, apop_model *)|
|double(*||scaling )(apop_model *)|
For use with the apop_dconstrain model. See its documentation for an example.
|apop_model * apop_dconstrain_settings::base_model|
The model, before constraint.
The constraint. Return 1 if the data is in the constraint; zero if out.
How many draws to make for calculating the in-constraint model density via random draws. Current default: 1e4.
|gsl_vector * apop_dconstrain_settings::last_params|
The parameters used to calculate
scale. If these change, recalculate.
For internal use.
|gsl_rng * apop_dconstrain_settings::rng|
If you don't provide a
scaling function, I calculate the in-constraint model density via random draws. If no
rng is provided, I use a default RNG; see apop_rng_get_thread.
After the scaling has been calculated, store it here. If you change the parameters of your base model, set this to zero to have the scaling recalculated.
|double(* apop_dconstrain_settings::scaling)(apop_model *)|
Optional. Return the percent of the model density inside the constraint.