1 #ifndef STAN_LANG_AST_FUN_HAS_NON_PARAM_VAR_VIS_DEF_HPP 2 #define STAN_LANG_AST_FUN_HAS_NON_PARAM_VAR_VIS_DEF_HPP 5 #include <boost/variant/apply_visitor.hpp> 14 || name ==
"append_col" 20 || name ==
"negative_infinity" 21 || name ==
"not_a_number" 22 || name ==
"append_row" 23 || name ==
"rep_matrix" 24 || name ==
"rep_row_vector" 25 || name ==
"rep_vector" 28 || name ==
"positive_infinity" 33 || name ==
"to_vector" 34 || name ==
"to_row_vector" 35 || name ==
"to_matrix" 36 || name ==
"to_array_1d" 37 || name ==
"to_array_2d" 38 || name ==
"transpose";
58 for (
size_t i = 0; i < e.
args_.size(); ++i)
59 if (boost::apply_visitor(*
this, e.
args_[i].expr_))
72 return boost::apply_visitor(*
this, e.
y0_.
expr_)
79 return boost::apply_visitor(*
this, e.
y0_.
expr_)
85 for (
size_t i = 0; i < e.
args_.size(); ++i)
86 if (boost::apply_visitor(*
this, e.
args_[i].expr_))
90 for (
size_t i = 0; i < e.
args_.size(); ++i)
98 return boost::apply_visitor(*
this, e.
expr_.
expr_);
102 return boost::apply_visitor(*
this, e.
expr_.
expr_);
126 if (e.
op ==
"*" || e.
op ==
"/")
has_non_param_var_vis(const variable_map &var_map)
Construct the visitor with the specified global variable declaration mapping.
std::string name_
Name of variable.
std::vector< expression > args_
Sequence of expressions for array values.
Node for holding a double literal.
Probability, optimization and sampling library.
expression y0_
Initial state (array of real).
Structure to hold an array expression.
Structure for an indexed expression.
std::vector< expression > args_
Sequence of argument expressions for function.
Structure for function application.
const int transformed_parameter_origin
The origin of the variable is the transformed parameter block.
expression expr_
Expression being indexed.
expression y0_
Initial state.
A map from function names to their base declarations and their origin.
Structure for integrate diff eq statement.
bool operator()(const nil &e) const
Return true if the specified expression contains a variable not declared as a parameter.
expression cond_
Condition (integer).
expression true_val_
Return value if condition is true.
std::string name_
Name of function being applied.
expression left
First argument.
var_origin get_origin(const std::string &name) const
Return the origin of the variable declaration for the variable with the specified name...
expression theta_
Parameters.
int var_origin
The type of a variable indicating where a variable was declared.
bool has_non_param_var(const expression &e, const variable_map &var_map)
Returns true if the specified expression contains a variable that requires a Jacobian warning...
bool has_var(const expression &e, const variable_map &var_map)
Returns true if the specified expression contains a variable that is defined as a parameter...
bool is_linear_function(const std::string &name)
AST structure for holding an expression with a sequence of indexes.
Structure for the conditional operator.
Structure to hold a variable.
expression right
Second argument.
const variable_map & var_map_
Reference to global variable declaration map.
expression subject
Argument.
const int local_origin
The origin of the variable is as a local variable.
expression theta_
Parameters (array of real).
AST structure for unary operations consisting of an operation and argument.
std::string op
String representation of the operation.
Node for storing binary operations consisting of an operation and left and right arguments.
The nil structure used as a placeholder for undefined or empty values in several structures.
expression false_val_
Return value if condition is false.
Structure for a diff eq integration statement with control parameters for the integrator.
expression expr_
Expression being indexed.