![]() |
Stan
2.10.0
probability, sampling & optimization
|
A chained_var_context object represents two objects of var_context as one. More...
#include <chained_var_context.hpp>
Public Member Functions | |
chained_var_context (const var_context &v1, const var_context &v2) | |
bool | contains_i (const std::string &name) const |
Return true if the specified variable name has integer values. More... | |
bool | contains_r (const std::string &name) const |
Return true if the specified variable name is defined. More... | |
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 order. More... | |
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 empty sequence if the variable is not defined. More... | |
std::vector< size_t > | dims_r (const std::string &name) const |
Return the dimensions for the specified floating point variable. More... | |
std::vector< size_t > | dims_i (const std::string &name) const |
Return the dimensions of the specified floating point variable. More... | |
void | names_r (std::vector< std::string > &names) const |
Return a list of the names of the floating point variables in the context. More... | |
void | names_i (std::vector< std::string > &names) const |
Return a list of the names of the integer variables in the context. More... | |
![]() | |
virtual | ~var_context () |
void | add_vec (std::stringstream &msg, const std::vector< size_t > &dims) const |
void | validate_dims (const std::string &stage, const std::string &name, const std::string &base_type, const std::vector< size_t > &dims_declared) const |
Additional Inherited Members | |
![]() | |
static std::vector< size_t > | to_vec () |
static std::vector< size_t > | to_vec (size_t n1) |
static std::vector< size_t > | to_vec (size_t n1, size_t n2) |
static std::vector< size_t > | to_vec (size_t n1, size_t n2, size_t n3) |
static std::vector< size_t > | to_vec (size_t n1, size_t n2, size_t n3, size_t n4) |
static std::vector< size_t > | to_vec (size_t n1, size_t n2, size_t n3, size_t n4, size_t n5) |
static std::vector< size_t > | to_vec (size_t n1, size_t n2, size_t n3, size_t n4, size_t n5, size_t n6) |
static std::vector< size_t > | to_vec (size_t n1, size_t n2, size_t n3, size_t n4, size_t n5, size_t n6, size_t n7) |
static std::vector< size_t > | to_vec (size_t n1, size_t n2, size_t n3, size_t n4, size_t n5, size_t n6, size_t n7, size_t n8) |
A chained_var_context object represents two objects of var_context as one.
Definition at line 15 of file chained_var_context.hpp.
|
inline |
Definition at line 21 of file chained_var_context.hpp.
|
inlinevirtual |
Return true
if the specified variable name has integer values.
name | Name of variable. |
true
if an integer variable of the specified name is defined. Implements stan::io::var_context.
Definition at line 25 of file chained_var_context.hpp.
|
inlinevirtual |
Return true
if the specified variable name is defined.
This method should return true
even if the values are all integers.
name | Name of variable. |
true
if the variable exists with real values. Implements stan::io::var_context.
Definition at line 29 of file chained_var_context.hpp.
|
inlinevirtual |
Return the dimensions of the specified floating point variable.
If the variable doesn't exist (or if it is a scalar), the return result should be the empty vector.
name | Name of variable. |
Implements stan::io::var_context.
Definition at line 45 of file chained_var_context.hpp.
|
inlinevirtual |
Return the dimensions for the specified floating point variable.
If the variable doesn't exist or if it is a scalar, the return result should be the empty vector.
name | Name of variable. |
Implements stan::io::var_context.
Definition at line 41 of file chained_var_context.hpp.
|
inlinevirtual |
Return a list of the names of the integer variables in the context.
names | Vector to store the list of names in. |
Implements stan::io::var_context.
Definition at line 56 of file chained_var_context.hpp.
|
inlinevirtual |
Return a list of the names of the floating point variables in the context.
names | Vector to store the list of names in. |
Implements stan::io::var_context.
Definition at line 49 of file chained_var_context.hpp.
|
inlinevirtual |
Return the integer values for the variable of the specified name in last-index-major order or the empty sequence if the variable is not defined.
name | Name of variable. |
Implements stan::io::var_context.
Definition at line 37 of file chained_var_context.hpp.
|
inlinevirtual |
Return the floating point values for the variable of the specified variable name in last-index-major order.
This method should cast integers to floating point values if the values of the named variable are all integers.
If there is no variable of the specified name, the empty vector is returned.
name | Name of variable. |
Implements stan::io::var_context.
Definition at line 33 of file chained_var_context.hpp.