1 #ifndef STAN_IO_CHAINED_VAR_CONTEXT_HPP
2 #define STAN_IO_CHAINED_VAR_CONTEXT_HPP
33 std::vector<double>
vals_r(
const std::string& name)
const {
37 std::vector<int>
vals_i(
const std::string& name)
const {
41 std::vector<size_t>
dims_r(
const std::string& name)
const {
45 std::vector<size_t>
dims_i(
const std::string& name)
const {
49 void names_r(std::vector<std::string>& names)
const {
51 std::vector<std::string> names2;
53 names.insert(names.end(), names2.begin(), names2.end());
56 void names_i(std::vector<std::string>& names)
const {
58 std::vector<std::string> names2;
60 names.insert(names.end(), names2.begin(), names2.end());
std::vector< double > vals_r(const std::string &name) const
Return the floating point values for the variable of the specified variable name in last-index-major ...
Probability, optimization and sampling library.
virtual std::vector< int > vals_i(const std::string &name) const =0
Return the integer values for the variable of the specified name in last-index-major order or the emp...
virtual std::vector< double > vals_r(const std::string &name) const =0
Return the floating point values for the variable of the specified variable name in last-index-major ...
virtual bool contains_r(const std::string &name) const =0
Return true if the specified variable name is defined.
virtual bool contains_i(const std::string &name) const =0
Return true if the specified variable name has integer values.
void names_i(std::vector< std::string > &names) const
Return a list of the names of the integer variables in the context.
std::vector< size_t > dims_i(const std::string &name) const
Return the dimensions of the specified floating point variable.
bool contains_i(const std::string &name) const
Return true if the specified variable name has integer values.
virtual void names_i(std::vector< std::string > &names) const =0
Return a list of the names of the integer variables in the context.
virtual void names_r(std::vector< std::string > &names) const =0
Return a list of the names of the floating point variables in the context.
std::vector< int > vals_i(const std::string &name) const
Return the integer values for the variable of the specified name in last-index-major order or the emp...
A var_reader reads array variables of integer and floating point type by name and dimension...
bool contains_r(const std::string &name) const
Return true if the specified variable name is defined.
void names_r(std::vector< std::string > &names) const
Return a list of the names of the floating point variables in the context.
std::vector< size_t > dims_r(const std::string &name) const
Return the dimensions for the specified floating point variable.
chained_var_context(const var_context &v1, const var_context &v2)
virtual std::vector< size_t > dims_r(const std::string &name) const =0
Return the dimensions for the specified floating point variable.
A chained_var_context object represents two objects of var_context as one.
virtual std::vector< size_t > dims_i(const std::string &name) const =0
Return the dimensions of the specified floating point variable.