stan-dev/stan

var_context builder

Aperta

#2924 aperta il 23 mag 2020

 (0 commenti) (0 reazioni) (0 assegnatari)C++ (387 fork)batch import
featuregood first issue

Metriche repository

Star
 (2761 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Summary:

It'd be nice to have a builder pattern for var contexts to make them easy to construct for testing. Something that could be used like this:

MatrixXd m(3, 2); 
...
var_context vc
  = var_context::builder()
    .matrix("a", m)
    .real("f", 2.3)
    .build();

Current Version:

v2.23.0

Guida contributor