![]() |
Stan
2.14.0
probability, sampling & optimization
|
Functions | |
| template<class Model > | |
| bool | initialize_state_values (Eigen::VectorXd &cont_params, Model &model, interface_callbacks::writer::base_writer &writer) |
| template<class Model > | |
| bool | initialize_state_zero (Eigen::VectorXd &cont_params, Model &model, interface_callbacks::writer::base_writer &writer) |
| Sets initial state to zero. More... | |
| template<class Model , class RNG > | |
| bool | initialize_state_random (const double R, Eigen::VectorXd &cont_params, Model &model, RNG &base_rng, interface_callbacks::writer::base_writer &writer) |
| Initializes state to random uniform values within range. More... | |
| template<class ContextFactory , class Model , class RNG > | |
| bool | initialize_state_source_and_random (const std::string &source, double R, Eigen::VectorXd &cont_params, Model &model, RNG &base_rng, interface_callbacks::writer::base_writer &writer, ContextFactory &context_factory) |
| Creates the initial state. More... | |
| template<class ContextFactory , class Model , class RNG > | |
| bool | initialize_state_source (const std::string source, Eigen::VectorXd &cont_params, Model &model, RNG &base_rng, interface_callbacks::writer::base_writer &writer, ContextFactory &context_factory, bool enable_random_init=false, double R=2) |
| Creates the initial state using the source parameter. More... | |
| bool | get_double_from_string (const std::string &s, double &val) |
| Converts string to double. More... | |
| template<class ContextFactory , class Model , class RNG > | |
| bool | initialize_state (const std::string &init, Eigen::VectorXd &cont_params, Model &model, RNG &base_rng, interface_callbacks::writer::base_writer &writer, ContextFactory &context_factory, bool enable_random_init=false, double init_r=2) |
| Creates the initial state. More... | |
| bool stan::services::init::get_double_from_string | ( | const std::string & | s, |
| double & | val | ||
| ) |
Converts string to double.
Returns true if it is able to convert the number, false otherwise.
| [in] | s | string input |
| [out] | val | the double value of the string if it is parsable as a double; else NaN |
Definition at line 387 of file initialize_state.hpp.
| bool stan::services::init::initialize_state | ( | const std::string & | init, |
| Eigen::VectorXd & | cont_params, | ||
| Model & | model, | ||
| RNG & | base_rng, | ||
| interface_callbacks::writer::base_writer & | writer, | ||
| ContextFactory & | context_factory, | ||
| bool | enable_random_init = false, |
||
| double | init_r = 2 |
||
| ) |
Creates the initial state.
| [in] | init | init can either be "0", a number as a string, or a filename. |
| [out] | cont_params | the initialized state. This should be the right size and set to 0. |
| [in,out] | model | the model. Side effects on model? I'm not quite sure |
| [in,out] | base_rng | the random number generator. State may change. |
| [in,out] | writer | writer callback for messages |
| [in,out] | context_factory | an instantiated factory that implements the concept of a context_factory. This has one method that takes a string. |
| [in] | enable_random_init | true or false. |
| [in] | init_r | a double for the range of generating random inits. it's used for randomly generating partial inits |
Definition at line 418 of file initialize_state.hpp.
| bool stan::services::init::initialize_state_random | ( | const double | R, |
| Eigen::VectorXd & | cont_params, | ||
| Model & | model, | ||
| RNG & | base_rng, | ||
| interface_callbacks::writer::base_writer & | writer | ||
| ) |
Initializes state to random uniform values within range.
| [in] | R | valid range of the initialization; must be greater than or equal to 0. |
| [out] | cont_params | the initialized state. This should be the right size and set to 0. |
| [in,out] | model | the model. Side effects on model? I'm not quite sure |
| [in,out] | base_rng | the random number generator. State may change. |
| [in,out] | writer | writer callback for messages |
Definition at line 195 of file initialize_state.hpp.
| bool stan::services::init::initialize_state_source | ( | const std::string | source, |
| Eigen::VectorXd & | cont_params, | ||
| Model & | model, | ||
| RNG & | base_rng, | ||
| interface_callbacks::writer::base_writer & | writer, | ||
| ContextFactory & | context_factory, | ||
| bool | enable_random_init = false, |
||
| double | R = 2 |
||
| ) |
Creates the initial state using the source parameter.
| [in] | source | a string that the context_factory can interpret and provide a valid var_context |
| [out] | cont_params | the initialized state. This should be the right size and set to 0. |
| [in,out] | model | the model. Side effects on model? I'm not quite sure |
| [in,out] | base_rng | the random number generator. State may change. |
| [in,out] | writer | writer callback for messages |
| [in,out] | context_factory | an instantiated factory that implements the concept of a context_factory. This has one method that takes a string. |
| [in] | enable_random_init | true or false |
| [in] | R | a double for the range of generating random inits. it's used for randomly generating partial inits |
Definition at line 347 of file initialize_state.hpp.
| bool stan::services::init::initialize_state_source_and_random | ( | const std::string & | source, |
| double | R, | ||
| Eigen::VectorXd & | cont_params, | ||
| Model & | model, | ||
| RNG & | base_rng, | ||
| interface_callbacks::writer::base_writer & | writer, | ||
| ContextFactory & | context_factory | ||
| ) |
Creates the initial state.
| [in] | source | a string that the context_factory can interpret and provide a valid var_context |
| [in] | R | a double to specify the range of random inits |
| [out] | cont_params | the initialized state. This should be the right size and set to 0. |
| [in,out] | model | the model. Side effects on model? I'm not quite sure |
| [in,out] | base_rng | the random number generator. State may change. |
| [in,out] | writer | writer callback for messages |
| [in,out] | context_factory | an instantiated factory that implements the concept of a context_factory. This has one method that takes a string. |
Definition at line 258 of file initialize_state.hpp.
| bool stan::services::init::initialize_state_values | ( | Eigen::VectorXd & | cont_params, |
| Model & | model, | ||
| interface_callbacks::writer::base_writer & | writer | ||
| ) |
Definition at line 117 of file initialize_state.hpp.
| bool stan::services::init::initialize_state_zero | ( | Eigen::VectorXd & | cont_params, |
| Model & | model, | ||
| interface_callbacks::writer::base_writer & | writer | ||
| ) |
Sets initial state to zero.
| [out] | cont_params | the initialized state. This should be the right size and set to 0. |
| [in,out] | model | the model. Side effects on model? I'm not quite sure |
| [in,out] | writer | writer callback for messages |
Definition at line 173 of file initialize_state.hpp.