Stan  2.10.0
probability, sampling & optimization
Classes | Typedefs | Functions | Variables
stan::lang Namespace Reference

Classes

struct  add_conditional_body
 
struct  add_conditional_condition
 
struct  add_expression_dimss
 
struct  add_fun_var
 
struct  add_function_signature
 
struct  add_idxs
 
struct  add_line_number
 
struct  add_loop_identifier
 
struct  add_lp_var
 
struct  add_var
 
struct  add_while_body
 
struct  add_while_condition
 
struct  addition_expr3
 
struct  arg_decl
 
struct  array_literal
 
struct  assgn
 
struct  assign_lhs
 
struct  assignment
 
struct  bare_type_grammar
 
struct  base_var_decl
 
struct  binary_op
 
struct  binary_op_expr
 
struct  cholesky_corr_var_decl
 
struct  cholesky_factor_var_decl
 
struct  conditional_op
 
struct  conditional_statement
 
struct  constrained_param_names_visgen
 
struct  contains_nonparam_var
 
struct  contains_var
 
struct  copy_square_cholesky_dimension_if_necessary
 
struct  corr_matrix_var_decl
 
struct  cov_matrix_var_decl
 
struct  data_only_expression
 
struct  deprecate_increment_log_prob
 
struct  deprecate_old_assignment_op
 
struct  deprecated_integrate_ode
 
struct  distribution
 
struct  division_expr
 
struct  double_literal
 
struct  double_var_decl
 
struct  dump_member_var_visgen
 
struct  elt_division_expr
 
struct  elt_multiplication_expr
 
struct  empty_range
 
struct  exponentiation_expr
 
struct  expr_type
 
struct  expression
 
struct  expression07_grammar
 
struct  expression_as_statement
 
struct  expression_grammar
 
struct  expression_type_vis
 
struct  expression_visgen
 
struct  for_statement
 
struct  fun
 
struct  function_decl_def
 
struct  function_decl_defs
 
class  function_signatures
 
struct  functions_grammar
 
struct  generate_init_vars_visgen
 
struct  generate_init_visgen
 
struct  generate_local_var_init_nan_visgen
 
struct  identifier_to_var
 
struct  idx
 
struct  idx_user_visgen
 
struct  idx_visgen
 
struct  increment_log_prob_statement
 
struct  increment_size_t
 
struct  index_op
 
struct  index_op_sliced
 
struct  indexes_grammar
 
struct  init_local_var_visgen
 
struct  int_literal
 
struct  int_var_decl
 
struct  integrate_ode
 
struct  integrate_ode_control
 
struct  is_multi_index_vis
 
struct  is_nil_op
 
struct  is_no_op_statement_vis
 
struct  is_numbered_statement_vis
 
struct  is_prob_fun
 
struct  lb_idx
 
struct  left_division_expr
 
struct  local_var_decl_visgen
 
struct  located_exception
 Structure for a located exception for standard library exception types that have no what-based constructors. More...
 
struct  logical_negate_expr
 
struct  lub_idx
 
struct  matrix_var_decl
 
struct  member_var_decl_visgen
 
struct  modulus_expr
 
struct  multi_idx
 
struct  multiplication_expr
 
struct  name_vis
 
struct  negate_expr
 
struct  nil
 Placeholder struct for boost::variant default ctors. More...
 
struct  no_op_statement
 
struct  omni_idx
 
struct  ordered_var_decl
 
struct  phoenix_functor_binary
 This is the base class for binary functors that are adapted to lazy semantic actions by boost::phoenix. More...
 
struct  phoenix_functor_quaternary
 This is the base class for quatenary functors that are adapted to lazy semantic actions by boost::phoenix. More...
 
struct  phoenix_functor_quinary
 This is the base class for quinary functors that are adapted to lazy semantic actions by boost::phoenix. More...
 
struct  phoenix_functor_senary
 This is the base class for senary functors that are adapted to lazy semantic actions by boost::phoenix. More...
 
struct  phoenix_functor_septenary
 This is the base class for septenary functors that are adapted to lazy semantic actions by boost::phoenix. More...
 
struct  phoenix_functor_ternary
 This is the base class for ternary functors that are adapted to lazy semantic actions by boost::phoenix. More...
 
struct  phoenix_functor_unary
 This is the base class for unnary functors that are adapted to lazy semantic actions by boost::phoenix. More...
 
struct  positive_ordered_var_decl
 
struct  print_statement
 
struct  printable
 
struct  printable_visgen
 
struct  program
 
struct  program_error
 
struct  program_grammar
 
struct  range
 
struct  reject_statement
 
struct  remove_loop_identifier
 
struct  remove_lp_var
 
struct  return_statement
 
struct  returns_type_vis
 
struct  row_vector_var_decl
 
struct  sample
 
struct  scope_lp
 
struct  set_allows_sampling_origin
 
struct  set_double_range_lower
 
struct  set_double_range_upper
 
struct  set_fun_type_named
 
struct  set_int_range_lower
 
struct  set_int_range_upper
 
struct  set_no_op
 
struct  set_omni_idx
 
struct  set_param_ranges_visgen
 
struct  set_var_type
 
struct  set_void_function
 
struct  set_void_return
 
struct  simplex_var_decl
 
struct  statement
 
struct  statement_2_grammar
 
struct  statement_grammar
 
struct  statement_visgen
 
struct  statements
 
struct  subtraction_expr3
 
struct  term_grammar
 
struct  transpose_expr
 
struct  ub_idx
 
struct  unary_op
 
struct  unconstrained_param_names_visgen
 
struct  uni_idx
 
struct  unit_vector_var_decl
 
struct  unscope_locals
 
struct  unscope_variables
 
struct  validate_allow_sample
 
struct  validate_assgn
 
struct  validate_assignment
 
struct  validate_conditional_op
 
struct  validate_decl_constraints
 
struct  validate_declarations
 
struct  validate_expr_type3
 
struct  validate_identifier
 
struct  validate_int_data_expr
 
struct  validate_int_expr
 
struct  validate_int_expr_warn
 
struct  validate_int_expression
 
struct  validate_integrate_ode
 
struct  validate_integrate_ode_control
 
struct  validate_ints_expression
 
struct  validate_no_constraints_vis
 
struct  validate_non_void_arg_function
 
struct  validate_non_void_expression
 
struct  validate_pmf_pdf_variate
 
struct  validate_prob_fun
 
struct  validate_return_allowed
 
struct  validate_return_type
 
struct  validate_sample
 
struct  validate_transformed_params_visgen
 
struct  validate_var_decl_visgen
 
struct  validate_void_return_allowed
 
struct  var_decl
 
struct  var_decl_base_type_vis
 
struct  var_decls_grammar
 
struct  var_occurs_vis
 
struct  var_resizing_visgen
 
struct  var_size_validating_visgen
 
struct  variable
 
struct  variable_dims
 
struct  variable_map
 
struct  vector_var_decl
 
struct  visgen
 generic visitor with output for extension More...
 
struct  while_statement
 
struct  whitespace_grammar
 
struct  write_array_vars_visgen
 
struct  write_array_visgen
 
struct  write_dims_visgen
 
struct  write_param_names_visgen
 

Typedefs

typedef int base_expr_type
 
typedef int var_origin
 
typedef std::pair< expr_type, std::vector< expr_type > > function_signature_t
 
typedef std::string::const_iterator input_iterator_t
 
typedef boost::spirit::line_pos_iterator< input_iterator_tpos_iterator_t
 

Functions

bool is_data_origin (const var_origin &vo)
 
void print_var_origin (std::ostream &o, const var_origin &vo)
 
std::ostream & write_base_expr_type (std::ostream &o, base_expr_type type)
 
std::ostream & operator<< (std::ostream &o, const expr_type &et)
 
expr_type promote_primitive (const expr_type &et)
 
expr_type promote_primitive (const expr_type &et1, const expr_type &et2)
 
bool is_nil (const expression &e)
 
size_t total_dims (const std::vector< std::vector< expression > > &dimss)
 
expr_type infer_type_indexing (const base_expr_type &expr_base_type, size_t num_expr_dims, size_t num_index_dims)
 
expr_type infer_type_indexing (const expression &expr, size_t num_index_dims)
 
bool is_multi_index (const idx &idx)
 
bool returns_type (const expr_type &return_type, const statement &statement, std::ostream &error_msgs)
 
expr_type indexed_type (const expression &e, const std::vector< idx > &idxs)
 Return the type of the expression indexed by the generalized index sequence. More...
 
void generate_expression (const expression &e, std::ostream &o)
 
void generate_expression (const expression &e, bool user_facing, std::ostream &o)
 
bool has_rng_suffix (const std::string &s)
 
bool has_lp_suffix (const std::string &s)
 
bool is_user_defined (const std::string &name, const std::vector< expression > &args)
 
bool is_user_defined_prob_function (const std::string &name, const expression &variate, const std::vector< expression > &params)
 
bool is_user_defined (const fun &fx)
 
bool has_var (const expression &e, const variable_map &var_map)
 
bool has_non_param_var (const expression &e, const variable_map &var_map)
 
bool is_assignable (const expr_type &l_type, const expr_type &r_type, const std::string &failure_message, std::ostream &error_msgs)
 
bool ends_with (const std::string &suffix, const std::string &s)
 
std::string get_cdf (const std::string &dist_name)
 
std::string get_ccdf (const std::string &dist_name)
 
std::string get_prob_fun (const std::string &dist_name)
 
bool has_prob_fun_suffix (const std::string &name)
 
std::string strip_prob_fun_suffix (const std::string &dist_fun)
 
bool has_cdf_suffix (const std::string &name)
 
std::string strip_cdf_suffix (const std::string &dist_fun)
 
bool has_ccdf_suffix (const std::string &name)
 
std::string strip_ccdf_suffix (const std::string &dist_fun)
 
bool fun_name_exists (const std::string &name)
 
bool is_binary_operator (const std::string &name)
 
bool is_unary_operator (const std::string &name)
 
bool is_unary_postfix_operator (const std::string &name)
 
bool is_operator (const std::string &name)
 
std::string fun_name_to_operator (const std::string &name)
 
void print_signature (const std::string &name, const std::vector< expr_type > &arg_types, bool sampling_error_style, std::ostream &msgs)
 
bool is_linear_function (const std::string &name)
 
bool compile (std::ostream *msgs, std::istream &stan_lang_in, std::ostream &cpp_out, const std::string &model_name)
 Read a Stan model specification from the specified input, parse it, and write the C++ code for it to the specified output. More...
 
void generate_expression (const expression &e, bool user_facing, bool is_var, std::ostream &o)
 
void generate_bare_type (const expr_type &t, const std::string &scalar_t_name, std::ostream &out)
 
const std::string EOL ("\n")
 
const std::string EOL2 ("\n\n")
 
const std::string INDENT (" ")
 
const std::string INDENT2 (" ")
 
const std::string INDENT3 (" ")
 
template<typename D >
bool has_lub (const D &x)
 
template<typename D >
bool has_ub (const D &x)
 
template<typename D >
bool has_lb (const D &x)
 
template<typename T >
std::string to_string (T i)
 
void generate_indent (size_t indent, std::ostream &o)
 
void generate_void_statement (const std::string &name, const size_t indent, std::ostream &o)
 
void generate_start_namespace (std::string name, std::ostream &o)
 
void generate_end_namespace (std::ostream &o)
 
void generate_comment (std::string const &msg, int indent, std::ostream &o)
 
void generate_quoted_string (const std::string &s, std::ostream &o)
 Print a the specified string to the specified output stream, wrapping in double quotes (") and replacing all double quotes in the input with apostrophes ('). More...
 
void generate_indexed_expr_user (const std::string &expr, const std::vector< expression > indexes, base_expr_type base_type, std::ostream &o)
 
template<bool isLHS>
void generate_indexed_expr (const std::string &expr, const std::vector< expression > indexes, base_expr_type base_type, size_t e_num_dims, bool user_facing, std::ostream &o)
 
void generate_type (const std::string &base_type, const std::vector< expression > &, size_t end, std::ostream &o)
 
void generate_idxs (const std::vector< idx > &idxs, std::ostream &o)
 
void generate_idxs_user (const std::vector< idx > &idxs, std::ostream &o)
 
static void print_string_literal (std::ostream &o, const std::string &s)
 
static void print_quoted_expression (std::ostream &o, const expression &e)
 
void generate_printable (const printable &p, std::ostream &o)
 
void generate_using (const std::string &type, std::ostream &o)
 
void generate_using_namespace (const std::string &ns, std::ostream &o)
 
void generate_usings (std::ostream &o)
 
void generate_typedef (const std::string &type, const std::string &abbrev, std::ostream &o)
 
void generate_typedefs (std::ostream &o)
 
void generate_include (const std::string &lib_name, std::ostream &o)
 
void generate_includes (std::ostream &o)
 
void generate_version_comment (std::ostream &o)
 
void generate_class_decl (const std::string &model_name, std::ostream &o)
 
void generate_end_class_decl (std::ostream &o)
 
void generate_eigen_index_expression (const expression &e, std::ostream &o)
 
void generate_initializer (std::ostream &o, const std::string &base_type, const std::vector< expression > &dims, const expression &type_arg1=expression(), const expression &type_arg2=expression())
 
void generate_validate_context_size (std::ostream &o, const std::string &stage, const std::string &var_name, const std::string &base_type, const std::vector< expression > &dims, const expression &type_arg1=expression(), const expression &type_arg2=expression())
 
void generate_validate_positive (const std::string &var_name, const expression &expr, std::ostream &o)
 
void generate_initialization (std::ostream &o, const std::string &var_name, const std::string &base_type, const std::vector< expression > &dims, const expression &type_arg1=expression(), const expression &type_arg2=expression())
 
void generate_var_resizing (const std::vector< var_decl > &vs, std::ostream &o)
 
const std::vector< expressionEMPTY_EXP_VECTOR (0)
 
void generate_local_var_inits (std::vector< var_decl > vs, bool is_var, bool declare_vars, std::ostream &o)
 
void generate_public_decl (std::ostream &o)
 
void generate_private_decl (std::ostream &o)
 
void generate_validate_var_decl (const var_decl &decl, int indent, std::ostream &o)
 
void generate_validate_var_decls (const std::vector< var_decl > decls, int indent, std::ostream &o)
 
void generate_member_var_decls (const std::vector< var_decl > &vs, int indent, std::ostream &o)
 
void generate_local_var_decls (const std::vector< var_decl > &vs, int indent, std::ostream &o, bool is_var, bool is_fun_return)
 
void generate_local_var_init_nan (const std::vector< var_decl > &vs, int indent, std::ostream &o, bool is_var, bool is_fun_return)
 
void generate_init_vars (const std::vector< var_decl > &vs, int indent, std::ostream &o)
 
void generate_validate_transformed_params (const std::vector< var_decl > &vs, int indent, std::ostream &o)
 
void generate_idx (const idx &i, std::ostream &o)
 
void generate_idxs (size_t pos, const std::vector< idx > &idxs, std::ostream &o)
 
void generate_idx_user (const idx &i, std::ostream &o)
 
void generate_statement (statement const &s, int indent, std::ostream &o, bool include_sampling, bool is_var, bool is_fun_return)
 
void generate_statement (const statement &s, int indent, std::ostream &o, bool include_sampling, bool is_var, bool is_fun_return)
 
void generate_statements (const std::vector< statement > &ss, int indent, std::ostream &o, bool include_sampling, bool is_var, bool is_fun_return)
 
void generate_try (int indent, std::ostream &o)
 
void generate_catch_throw_located (int indent, std::ostream &o)
 
void generate_located_statement (const statement &s, int indent, std::ostream &o, bool include_sampling, bool is_var, bool is_fun_return)
 
void generate_located_statements (const std::vector< statement > &ss, int indent, std::ostream &o, bool include_sampling, bool is_var, bool is_fun_return)
 
void generate_log_prob (program const &p, std::ostream &o)
 
void suppress_warning (const std::string &indent, const std::string &var_name, std::ostream &o)
 
void generate_member_var_inits (const std::vector< var_decl > &vs, std::ostream &o)
 
void generate_destructor (const std::string &model_name, std::ostream &o)
 
void generate_set_param_ranges (const std::vector< var_decl > &var_decls, std::ostream &o)
 
void generate_constructor (const program &prog, const std::string &model_name, std::ostream &o)
 
void generate_init_method (const std::vector< var_decl > &vs, std::ostream &o)
 
void generate_dims_method (const program &prog, std::ostream &o)
 
void generate_param_names_method (const program &prog, std::ostream &o)
 
void generate_constrained_param_names_method (const program &prog, std::ostream &o)
 
void generate_unconstrained_param_names_method (const program &prog, std::ostream &o)
 
void generate_write_array_method (const program &prog, const std::string &model_name, std::ostream &o)
 
void generate_model_name_method (const std::string &model_name, std::ostream &out)
 
void generate_model_typedef (const std::string &model_name, std::ostream &out)
 
void generate_arg_decl (bool gen_const, bool gen_ref, const arg_decl &decl, const std::string &scalar_t_name, std::ostream &out)
 
bool has_only_int_args (const function_decl_def &fun)
 
std::string cond_op_scalar_type (const conditional_op &expr, bool is_data_origin)
 
std::string fun_scalar_type (const function_decl_def &fun, bool is_lp)
 
bool needs_template_params (const function_decl_def &fun)
 
void generate_function_template_parameters (const function_decl_def &fun, bool is_rng, bool is_lp, bool is_log, std::ostream &out)
 
void generate_function_inline_return_type (const function_decl_def &fun, const std::string &scalar_t_name, int indent, std::ostream &out)
 
void generate_function_name (const function_decl_def &fun, std::ostream &out)
 
void generate_function_arguments (const function_decl_def &fun, bool is_rng, bool is_lp, bool is_log, std::ostream &out)
 
void generate_functor_arguments (const function_decl_def &fun, bool is_rng, bool is_lp, bool is_log, std::ostream &out)
 
void generate_function_body (const function_decl_def &fun, const std::string &scalar_t_name, std::ostream &out)
 
void generate_propto_default_function_body (const function_decl_def &fun, std::ostream &out)
 
void generate_propto_default_function (const function_decl_def &fun, const std::string &scalar_t_name, std::ostream &out)
 
void generate_function (const function_decl_def &fun, std::ostream &out)
 Generate the specified function and optionally its default for propto=false for functions ending in _log. More...
 
void generate_function_functor (const function_decl_def &fun, std::ostream &out)
 
void generate_functions (const std::vector< function_decl_def > &funs, std::ostream &out)
 
void generate_member_var_decls_all (const program &prog, std::ostream &out)
 
void generate_globals (std::ostream &out)
 
void generate_cpp (const program &prog, const std::string &model_name, std::ostream &out)
 
bool has_prob_suffix (const std::string &s)
 
void replace_suffix (const std::string &old_suffix, const std::string &new_suffix, fun &f)
 
bool validate_double_expr (const expression &expr, std::stringstream &error_msgs)
 
void set_fun_type (fun &fun, std::ostream &error_msgs)
 
int num_dimss (std::vector< std::vector< stan::lang::expression > > &dimss)
 
template<class T >
void validate_integrate_ode_non_control_args (const T &ode_fun, const variable_map &var_map, bool &pass, std::ostream &error_msgs)
 
bool deprecate_fun (const std::string &old_name, const std::string &new_name, fun &f, std::ostream &msgs)
 
bool deprecate_suffix (const std::string &deprecated_suffix, const std::string &replacement, fun &f, std::ostream &msgs)
 
bool fun_exists (const std::set< std::pair< std::string, function_signature_t > > &existing, const std::pair< std::string, function_signature_t > &name_sig, bool name_only=true)
 
bool is_defined (const std::string &function_name, const std::vector< expr_type > &arg_types)
 
bool is_double_return (const std::string &function_name, const std::vector< expr_type > &arg_types, std::ostream &error_msgs)
 
bool is_univariate (const expr_type &et)
 
bool is_space (char c)
 
bool is_nonempty (std::string &s)
 
bool parse (std::ostream *output_stream, std::istream &input, const std::string &model_name, program &result)
 
template<typename E >
bool is_type (const std::exception &e)
 Returns true if the specified exception can be dynamically cast to the template parameter type. More...
 
void rethrow_located (const std::exception &e, int line)
 Rethrow an exception of type specified by the dynamic type of the specified exception, adding the specified line number to the specified exception's message. More...
 

Variables

const int VOID_T = 0
 
const int INT_T = 1
 
const int DOUBLE_T = 2
 
const int VECTOR_T = 3
 
const int ROW_VECTOR_T = 4
 
const int MATRIX_T = 5
 
const int ILL_FORMED_T = 6
 
const int model_name_origin = 0
 
const int data_origin = 1
 
const int transformed_data_origin = 2
 
const int parameter_origin = 3
 
const int transformed_parameter_origin = 4
 
const int derived_origin = 5
 
const int local_origin = 6
 
const int function_argument_origin = 7
 
const int function_argument_origin_lp = 8
 
const int function_argument_origin_rng = 9
 
const int void_function_argument_origin = 10
 
const int void_function_argument_origin_lp = 11
 
const int void_function_argument_origin_rng = 12
 
boost::phoenix::function< assign_lhsassign_lhs_f
 
boost::phoenix::function< validate_expr_type3validate_expr_type3_f
 
boost::phoenix::function< is_prob_funis_prob_fun_f
 
boost::phoenix::function< addition_expr3addition3_f
 
boost::phoenix::function< subtraction_expr3subtraction3_f
 
boost::phoenix::function< increment_size_tincrement_size_t_f
 
boost::phoenix::function< validate_conditional_opvalidate_conditional_op_f
 
boost::phoenix::function< binary_op_exprbinary_op_f
 
boost::phoenix::function< validate_non_void_arg_functionvalidate_non_void_arg_f
 
boost::phoenix::function< set_void_functionset_void_function_f
 
boost::phoenix::function< set_allows_sampling_originset_allows_sampling_origin_f
 
boost::phoenix::function< validate_declarationsvalidate_declarations_f
 
boost::phoenix::function< add_function_signatureadd_function_signature_f
 
boost::phoenix::function< validate_return_typevalidate_return_type_f
 
boost::phoenix::function< validate_pmf_pdf_variatevalidate_pmf_pdf_variate_f
 
boost::phoenix::function< validate_prob_funvalidate_prob_fun_f
 
boost::phoenix::function< scope_lpscope_lp_f
 
boost::phoenix::function< unscope_variablesunscope_variables_f
 
boost::phoenix::function< add_fun_varadd_fun_var_f
 
boost::phoenix::function< set_omni_idxset_omni_idx_f
 
boost::phoenix::function< validate_int_expressionvalidate_int_expression_f
 
boost::phoenix::function< validate_ints_expressionvalidate_ints_expression_f
 
boost::phoenix::function< add_lp_varadd_lp_var_f
 
boost::phoenix::function< remove_lp_varremove_lp_var_f
 
boost::phoenix::function< program_errorprogram_error_f
 
boost::phoenix::function< add_conditional_conditionadd_conditional_condition_f
 
boost::phoenix::function< add_conditional_bodyadd_conditional_body_f
 
boost::phoenix::function< deprecate_old_assignment_opdeprecate_old_assignment_op_f
 
boost::phoenix::function< validate_return_allowedvalidate_return_allowed_f
 
boost::phoenix::function< validate_void_return_allowedvalidate_void_return_allowed_f
 
boost::phoenix::function< identifier_to_varidentifier_to_var_f
 
boost::phoenix::function< validate_assgnvalidate_assgn_f
 
boost::phoenix::function< validate_assignmentvalidate_assignment_f
 
boost::phoenix::function< validate_samplevalidate_sample_f
 
boost::phoenix::function< expression_as_statementexpression_as_statement_f
 
boost::phoenix::function< unscope_localsunscope_locals_f
 
boost::phoenix::function< add_while_conditionadd_while_condition_f
 
boost::phoenix::function< add_while_bodyadd_while_body_f
 
boost::phoenix::function< add_loop_identifieradd_loop_identifier_f
 
boost::phoenix::function< remove_loop_identifierremove_loop_identifier_f
 
boost::phoenix::function< validate_int_expr_warnvalidate_int_expr_warn_f
 
boost::phoenix::function< deprecate_increment_log_probdeprecate_increment_log_prob_f
 
boost::phoenix::function< validate_allow_samplevalidate_allow_sample_f
 
boost::phoenix::function< validate_non_void_expressionvalidate_non_void_expression_f
 
boost::phoenix::function< add_line_numberadd_line_number_f
 
boost::phoenix::function< set_void_returnset_void_return_f
 
boost::phoenix::function< set_no_opset_no_op_f
 
boost::phoenix::function< deprecated_integrate_odedeprecated_integrate_ode_f
 
boost::phoenix::function< validate_integrate_odevalidate_integrate_ode_f
 
boost::phoenix::function< validate_integrate_ode_controlvalidate_integrate_ode_control_f
 
boost::phoenix::function< set_fun_type_namedset_fun_type_named_f
 
boost::phoenix::function< exponentiation_exprexponentiation_f
 
boost::phoenix::function< multiplication_exprmultiplication_f
 
boost::phoenix::function< division_exprdivision_f
 
boost::phoenix::function< modulus_exprmodulus_f
 
boost::phoenix::function< left_division_exprleft_division_f
 
boost::phoenix::function< elt_multiplication_exprelt_multiplication_f
 
boost::phoenix::function< elt_division_exprelt_division_f
 
boost::phoenix::function< negate_exprnegate_expr_f
 
boost::phoenix::function< logical_negate_exprlogical_negate_expr_f
 
boost::phoenix::function< transpose_exprtranspose_f
 
boost::phoenix::function< add_idxsadd_idxs_f
 
boost::phoenix::function< add_expression_dimssadd_expression_dimss_f
 
boost::phoenix::function< set_var_typeset_var_type_f
 
boost::phoenix::function< validate_decl_constraintsvalidate_decl_constraints_f
 
boost::phoenix::function< validate_identifiervalidate_identifier_f
 
boost::phoenix::function< copy_square_cholesky_dimension_if_necessarycopy_square_cholesky_dimension_if_necessary_f
 
boost::phoenix::function< empty_rangeempty_range_f
 
boost::phoenix::function< validate_int_exprvalidate_int_expr_f
 
boost::phoenix::function< set_int_range_lowerset_int_range_lower_f
 
boost::phoenix::function< set_int_range_upperset_int_range_upper_f
 
boost::phoenix::function< validate_int_data_exprvalidate_int_data_expr_f
 
boost::phoenix::function< set_double_range_lowerset_double_range_lower_f
 
boost::phoenix::function< set_double_range_upperset_double_range_upper_f
 
boost::phoenix::function< add_varadd_var_f
 

Typedef Documentation

Definition at line 64 of file ast.hpp.

typedef std::pair<expr_type, std::vector<expr_type> > stan::lang::function_signature_t

Definition at line 127 of file ast.hpp.

typedef std::string::const_iterator stan::lang::input_iterator_t

Definition at line 10 of file iterator_typedefs.hpp.

typedef boost::spirit::line_pos_iterator<input_iterator_t> stan::lang::pos_iterator_t

Definition at line 11 of file iterator_typedefs.hpp.

Definition at line 76 of file ast.hpp.

Function Documentation

bool stan::lang::compile ( std::ostream *  msgs,
std::istream &  stan_lang_in,
std::ostream &  cpp_out,
const std::string &  model_name 
)

Read a Stan model specification from the specified input, parse it, and write the C++ code for it to the specified output.

Parameters
msgsOutput stream for warning messages
stan_lang_inStan model specification
cpp_outC++ code output stream
model_nameName of model class
Returns
false if code could not be generated due to syntax error in the Stan model; true otherwise.

Definition at line 28 of file compiler.hpp.

std::string stan::lang::cond_op_scalar_type ( const conditional_op expr,
bool  is_data_origin 
)

Definition at line 4438 of file generator.hpp.

bool stan::lang::deprecate_fun ( const std::string &  old_name,
const std::string &  new_name,
fun f,
std::ostream &  msgs 
)

Definition at line 40 of file semantic_actions_def.cpp.

bool stan::lang::deprecate_suffix ( const std::string &  deprecated_suffix,
const std::string &  replacement,
fun f,
std::ostream &  msgs 
)

Definition at line 51 of file semantic_actions_def.cpp.

const std::vector<expression> stan::lang::EMPTY_EXP_VECTOR ( )
bool stan::lang::ends_with ( const std::string &  suffix,
const std::string &  s 
)

Definition at line 1951 of file ast_def.cpp.

const std::string stan::lang::EOL ( "\n"  )
const std::string stan::lang::EOL2 ( "\n\n"  )
bool stan::lang::fun_exists ( const std::set< std::pair< std::string, function_signature_t > > &  existing,
const std::pair< std::string, function_signature_t > &  name_sig,
bool  name_only = true 
)

Definition at line 322 of file semantic_actions_def.cpp.

bool stan::lang::fun_name_exists ( const std::string &  name)

Definition at line 2029 of file ast_def.cpp.

std::string stan::lang::fun_name_to_operator ( const std::string &  name)

Definition at line 364 of file ast_def.cpp.

std::string stan::lang::fun_scalar_type ( const function_decl_def fun,
bool  is_lp 
)

Definition at line 4445 of file generator.hpp.

void stan::lang::generate_arg_decl ( bool  gen_const,
bool  gen_ref,
const arg_decl decl,
const std::string &  scalar_t_name,
std::ostream &  out 
)

Definition at line 4418 of file generator.hpp.

void stan::lang::generate_bare_type ( const expr_type t,
const std::string &  scalar_t_name,
std::ostream &  out 
)

Definition at line 4370 of file generator.hpp.

void stan::lang::generate_catch_throw_located ( int  indent,
std::ostream &  o 
)

Definition at line 2209 of file generator.hpp.

void stan::lang::generate_class_decl ( const std::string &  model_name,
std::ostream &  o 
)

Definition at line 523 of file generator.hpp.

void stan::lang::generate_comment ( std::string const &  msg,
int  indent,
std::ostream &  o 
)

Definition at line 90 of file generator.hpp.

void stan::lang::generate_constrained_param_names_method ( const program prog,
std::ostream &  o 
)

Definition at line 3736 of file generator.hpp.

void stan::lang::generate_constructor ( const program prog,
const std::string &  model_name,
std::ostream &  o 
)

Definition at line 3072 of file generator.hpp.

void stan::lang::generate_cpp ( const program prog,
const std::string &  model_name,
std::ostream &  out 
)

Definition at line 4764 of file generator.hpp.

void stan::lang::generate_destructor ( const std::string &  model_name,
std::ostream &  o 
)

Definition at line 2880 of file generator.hpp.

void stan::lang::generate_dims_method ( const program prog,
std::ostream &  o 
)

Definition at line 3517 of file generator.hpp.

void stan::lang::generate_eigen_index_expression ( const expression e,
std::ostream &  o 
)

Definition at line 533 of file generator.hpp.

void stan::lang::generate_end_class_decl ( std::ostream &  o)

Definition at line 528 of file generator.hpp.

void stan::lang::generate_end_namespace ( std::ostream &  o)

Definition at line 86 of file generator.hpp.

void stan::lang::generate_expression ( const expression e,
bool  user_facing,
bool  is_var,
std::ostream &  o 
)

Definition at line 417 of file generator.hpp.

void stan::lang::generate_expression ( const expression e,
std::ostream &  o 
)

Definition at line 433 of file generator.hpp.

void stan::lang::generate_expression ( const expression e,
bool  user_facing,
std::ostream &  o 
)

Definition at line 425 of file generator.hpp.

void stan::lang::generate_function ( const function_decl_def fun,
std::ostream &  out 
)

Generate the specified function and optionally its default for propto=false for functions ending in _log.

Exact behavior differs for unmarked functions, and functions ending in one of "_rng", "_lp", or "_log".

Parameters
[in]funfunction AST object
[in,out]outoutput stream to which function definition is written

Definition at line 4688 of file generator.hpp.

void stan::lang::generate_function_arguments ( const function_decl_def fun,
bool  is_rng,
bool  is_lp,
bool  is_log,
std::ostream &  out 
)

Definition at line 4558 of file generator.hpp.

void stan::lang::generate_function_body ( const function_decl_def fun,
const std::string &  scalar_t_name,
std::ostream &  out 
)

Definition at line 4613 of file generator.hpp.

void stan::lang::generate_function_functor ( const function_decl_def fun,
std::ostream &  out 
)

Definition at line 4710 of file generator.hpp.

void stan::lang::generate_function_inline_return_type ( const function_decl_def fun,
const std::string &  scalar_t_name,
int  indent,
std::ostream &  out 
)

Definition at line 4541 of file generator.hpp.

void stan::lang::generate_function_name ( const function_decl_def fun,
std::ostream &  out 
)

Definition at line 4552 of file generator.hpp.

void stan::lang::generate_function_template_parameters ( const function_decl_def fun,
bool  is_rng,
bool  is_lp,
bool  is_log,
std::ostream &  out 
)

Definition at line 4494 of file generator.hpp.

void stan::lang::generate_functions ( const std::vector< function_decl_def > &  funs,
std::ostream &  out 
)

Definition at line 4744 of file generator.hpp.

void stan::lang::generate_functor_arguments ( const function_decl_def fun,
bool  is_rng,
bool  is_lp,
bool  is_log,
std::ostream &  out 
)

Definition at line 4587 of file generator.hpp.

void stan::lang::generate_globals ( std::ostream &  out)

Definition at line 4758 of file generator.hpp.

void stan::lang::generate_idx ( const idx i,
std::ostream &  o 
)

Definition at line 1810 of file generator.hpp.

void stan::lang::generate_idx_user ( const idx i,
std::ostream &  o 
)

Definition at line 1859 of file generator.hpp.

void stan::lang::generate_idxs ( const std::vector< idx > &  idxs,
std::ostream &  o 
)

Definition at line 1828 of file generator.hpp.

void stan::lang::generate_idxs ( size_t  pos,
const std::vector< idx > &  idxs,
std::ostream &  o 
)

Definition at line 1815 of file generator.hpp.

void stan::lang::generate_idxs_user ( const std::vector< idx > &  idxs,
std::ostream &  o 
)

Definition at line 1864 of file generator.hpp.

void stan::lang::generate_include ( const std::string &  lib_name,
std::ostream &  o 
)

Definition at line 509 of file generator.hpp.

void stan::lang::generate_includes ( std::ostream &  o)

Definition at line 513 of file generator.hpp.

void stan::lang::generate_indent ( size_t  indent,
std::ostream &  o 
)

Definition at line 61 of file generator.hpp.

template<bool isLHS>
void stan::lang::generate_indexed_expr ( const std::string &  expr,
const std::vector< expression indexes,
base_expr_type  base_type,
size_t  e_num_dims,
bool  user_facing,
std::ostream &  o 
)

Definition at line 131 of file generator.hpp.

void stan::lang::generate_indexed_expr_user ( const std::string &  expr,
const std::vector< expression indexes,
base_expr_type  base_type,
std::ostream &  o 
)

Definition at line 115 of file generator.hpp.

void stan::lang::generate_init_method ( const std::vector< var_decl > &  vs,
std::ostream &  o 
)

Definition at line 3379 of file generator.hpp.

void stan::lang::generate_init_vars ( const std::vector< var_decl > &  vs,
int  indent,
std::ostream &  o 
)

Definition at line 1631 of file generator.hpp.

void stan::lang::generate_initialization ( std::ostream &  o,
const std::string &  var_name,
const std::string &  base_type,
const std::vector< expression > &  dims,
const expression type_arg1 = expression(),
const expression type_arg2 = expression() 
)

Definition at line 674 of file generator.hpp.

void stan::lang::generate_initializer ( std::ostream &  o,
const std::string &  base_type,
const std::vector< expression > &  dims,
const expression type_arg1 = expression(),
const expression type_arg2 = expression() 
)

Definition at line 540 of file generator.hpp.

void stan::lang::generate_local_var_decls ( const std::vector< var_decl > &  vs,
int  indent,
std::ostream &  o,
bool  is_var,
bool  is_fun_return 
)

Definition at line 1472 of file generator.hpp.

void stan::lang::generate_local_var_init_nan ( const std::vector< var_decl > &  vs,
int  indent,
std::ostream &  o,
bool  is_var,
bool  is_fun_return 
)

Definition at line 1554 of file generator.hpp.

void stan::lang::generate_local_var_inits ( std::vector< var_decl vs,
bool  is_var,
bool  declare_vars,
std::ostream &  o 
)

Definition at line 1013 of file generator.hpp.

void stan::lang::generate_located_statement ( const statement s,
int  indent,
std::ostream &  o,
bool  include_sampling,
bool  is_var,
bool  is_fun_return 
)

Definition at line 2228 of file generator.hpp.

void stan::lang::generate_located_statements ( const std::vector< statement > &  ss,
int  indent,
std::ostream &  o,
bool  include_sampling,
bool  is_var,
bool  is_fun_return 
)

Definition at line 2240 of file generator.hpp.

void stan::lang::generate_log_prob ( program const &  p,
std::ostream &  o 
)

Definition at line 2255 of file generator.hpp.

void stan::lang::generate_member_var_decls ( const std::vector< var_decl > &  vs,
int  indent,
std::ostream &  o 
)

Definition at line 1235 of file generator.hpp.

void stan::lang::generate_member_var_decls_all ( const program prog,
std::ostream &  out 
)

Definition at line 4752 of file generator.hpp.

void stan::lang::generate_member_var_inits ( const std::vector< var_decl > &  vs,
std::ostream &  o 
)

Definition at line 2873 of file generator.hpp.

void stan::lang::generate_model_name_method ( const std::string &  model_name,
std::ostream &  out 
)

Definition at line 4357 of file generator.hpp.

void stan::lang::generate_model_typedef ( const std::string &  model_name,
std::ostream &  out 
)

Definition at line 4364 of file generator.hpp.

void stan::lang::generate_param_names_method ( const program prog,
std::ostream &  o 
)

Definition at line 3597 of file generator.hpp.

void stan::lang::generate_printable ( const printable p,
std::ostream &  o 
)

Definition at line 467 of file generator.hpp.

void stan::lang::generate_private_decl ( std::ostream &  o)

Definition at line 1033 of file generator.hpp.

void stan::lang::generate_propto_default_function ( const function_decl_def fun,
const std::string &  scalar_t_name,
std::ostream &  out 
)

Definition at line 4667 of file generator.hpp.

void stan::lang::generate_propto_default_function_body ( const function_decl_def fun,
std::ostream &  out 
)

Definition at line 4650 of file generator.hpp.

void stan::lang::generate_public_decl ( std::ostream &  o)

Definition at line 1029 of file generator.hpp.

void stan::lang::generate_quoted_string ( const std::string &  s,
std::ostream &  o 
)

Print a the specified string to the specified output stream, wrapping in double quotes (") and replacing all double quotes in the input with apostrophes (').

For example, if the input string is ab"cde"fg then the string "ab'cde'fg" is streamed to the output stream.

Parameters
sString to output
oOutput stream

Definition at line 106 of file generator.hpp.

void stan::lang::generate_set_param_ranges ( const std::vector< var_decl > &  var_decls,
std::ostream &  o 
)

Definition at line 3063 of file generator.hpp.

void stan::lang::generate_start_namespace ( std::string  name,
std::ostream &  o 
)

Definition at line 81 of file generator.hpp.

void stan::lang::generate_statement ( statement const &  s,
int  indent,
std::ostream &  o,
bool  include_sampling,
bool  is_var,
bool  is_fun_return 
)
void stan::lang::generate_statement ( const statement s,
int  indent,
std::ostream &  o,
bool  include_sampling,
bool  is_var,
bool  is_fun_return 
)

Definition at line 2174 of file generator.hpp.

void stan::lang::generate_statements ( const std::vector< statement > &  ss,
int  indent,
std::ostream &  o,
bool  include_sampling,
bool  is_var,
bool  is_fun_return 
)

Definition at line 2191 of file generator.hpp.

void stan::lang::generate_try ( int  indent,
std::ostream &  o 
)

Definition at line 2202 of file generator.hpp.

void stan::lang::generate_type ( const std::string &  base_type,
const std::vector< expression > &  ,
size_t  end,
std::ostream &  o 
)

Definition at line 179 of file generator.hpp.

void stan::lang::generate_typedef ( const std::string &  type,
const std::string &  abbrev,
std::ostream &  o 
)

Definition at line 493 of file generator.hpp.

void stan::lang::generate_typedefs ( std::ostream &  o)

Definition at line 500 of file generator.hpp.

void stan::lang::generate_unconstrained_param_names_method ( const program prog,
std::ostream &  o 
)

Definition at line 3918 of file generator.hpp.

void stan::lang::generate_using ( const std::string &  type,
std::ostream &  o 
)

Definition at line 472 of file generator.hpp.

void stan::lang::generate_using_namespace ( const std::string &  ns,
std::ostream &  o 
)

Definition at line 476 of file generator.hpp.

void stan::lang::generate_usings ( std::ostream &  o)

Definition at line 481 of file generator.hpp.

void stan::lang::generate_validate_context_size ( std::ostream &  o,
const std::string &  stage,
const std::string &  var_name,
const std::string &  base_type,
const std::vector< expression > &  dims,
const expression type_arg1 = expression(),
const expression type_arg2 = expression() 
)

Definition at line 572 of file generator.hpp.

void stan::lang::generate_validate_positive ( const std::string &  var_name,
const expression expr,
std::ostream &  o 
)

Definition at line 663 of file generator.hpp.

void stan::lang::generate_validate_transformed_params ( const std::vector< var_decl > &  vs,
int  indent,
std::ostream &  o 
)

Definition at line 1766 of file generator.hpp.

void stan::lang::generate_validate_var_decl ( const var_decl decl,
int  indent,
std::ostream &  o 
)

Definition at line 1155 of file generator.hpp.

void stan::lang::generate_validate_var_decls ( const std::vector< var_decl decls,
int  indent,
std::ostream &  o 
)

Definition at line 1162 of file generator.hpp.

void stan::lang::generate_var_resizing ( const std::vector< var_decl > &  vs,
std::ostream &  o 
)

Definition at line 741 of file generator.hpp.

void stan::lang::generate_version_comment ( std::ostream &  o)

Definition at line 518 of file generator.hpp.

void stan::lang::generate_void_statement ( const std::string &  name,
const size_t  indent,
std::ostream &  o 
)

Definition at line 66 of file generator.hpp.

void stan::lang::generate_write_array_method ( const program prog,
const std::string &  model_name,
std::ostream &  o 
)

Definition at line 4241 of file generator.hpp.

std::string stan::lang::get_ccdf ( const std::string &  dist_name)

Definition at line 1967 of file ast_def.cpp.

std::string stan::lang::get_cdf ( const std::string &  dist_name)

Definition at line 1958 of file ast_def.cpp.

std::string stan::lang::get_prob_fun ( const std::string &  dist_name)

Definition at line 1976 of file ast_def.cpp.

bool stan::lang::has_ccdf_suffix ( const std::string &  name)

Definition at line 2016 of file ast_def.cpp.

bool stan::lang::has_cdf_suffix ( const std::string &  name)

Definition at line 2003 of file ast_def.cpp.

template<typename D >
bool stan::lang::has_lb ( const D &  x)

Definition at line 50 of file generator.hpp.

bool stan::lang::has_lp_suffix ( const std::string &  s)

Definition at line 1889 of file ast_def.cpp.

template<typename D >
bool stan::lang::has_lub ( const D &  x)

Definition at line 42 of file generator.hpp.

bool stan::lang::has_non_param_var ( const expression e,
const variable_map var_map 
)

Definition at line 925 of file ast_def.cpp.

bool stan::lang::has_only_int_args ( const function_decl_def fun)

Definition at line 4431 of file generator.hpp.

bool stan::lang::has_prob_fun_suffix ( const std::string &  name)

Definition at line 1987 of file ast_def.cpp.

bool stan::lang::has_prob_suffix ( const std::string &  s)

Definition at line 27 of file semantic_actions_def.cpp.

bool stan::lang::has_rng_suffix ( const std::string &  s)

Definition at line 1880 of file ast_def.cpp.

template<typename D >
bool stan::lang::has_ub ( const D &  x)

Definition at line 46 of file generator.hpp.

bool stan::lang::has_var ( const expression e,
const variable_map var_map 
)

Definition at line 835 of file ast_def.cpp.

const std::string stan::lang::INDENT ( " "  )
const std::string stan::lang::INDENT2 ( " "  )
const std::string stan::lang::INDENT3 ( " "  )
expr_type stan::lang::indexed_type ( const expression e,
const std::vector< idx > &  idxs 
)

Return the type of the expression indexed by the generalized index sequence.

Return the expression type for the result of applying the specified indexes to the specified expression.

Return a type with base type ILL_FORMED_T if there are too many indexes.

Parameters
[in]eExpression being indexed.
[in]idxsIndex sequence.
Returns
Type of expression applied to indexes.

If the reuslt is ill typed, the output type is ILL_FORMED_T and dimensions are OU.

Parameters
[in]eExpression to index.
[in]idxsVector of indexes.
Returns
Type of indexed expression.

Definition at line 1808 of file ast_def.cpp.

expr_type stan::lang::infer_type_indexing ( const base_expr_type expr_base_type,
size_t  num_expr_dims,
size_t  num_index_dims 
)

Definition at line 1080 of file ast_def.cpp.

expr_type stan::lang::infer_type_indexing ( const expression expr,
size_t  num_index_dims 
)

Definition at line 1099 of file ast_def.cpp.

bool stan::lang::is_assignable ( const expr_type l_type,
const expr_type r_type,
const std::string &  failure_message,
std::ostream &  error_msgs 
)

Definition at line 1927 of file ast_def.cpp.

bool stan::lang::is_binary_operator ( const std::string &  name)

Definition at line 337 of file ast_def.cpp.

bool stan::lang::is_data_origin ( const var_origin vo)

Definition at line 1223 of file ast_def.cpp.

bool stan::lang::is_defined ( const std::string &  function_name,
const std::vector< expr_type > &  arg_types 
)

Definition at line 919 of file semantic_actions_def.cpp.

bool stan::lang::is_double_return ( const std::string &  function_name,
const std::vector< expr_type > &  arg_types,
std::ostream &  error_msgs 
)

Definition at line 926 of file semantic_actions_def.cpp.

bool stan::lang::is_linear_function ( const std::string &  name)

Definition at line 805 of file ast_def.cpp.

bool stan::lang::is_multi_index ( const idx idx)

Definition at line 1218 of file ast_def.cpp.

bool stan::lang::is_nil ( const expression e)

Definition at line 955 of file ast_def.cpp.

bool stan::lang::is_nonempty ( std::string &  s)

Definition at line 52 of file parser.hpp.

bool stan::lang::is_operator ( const std::string &  name)

Definition at line 358 of file ast_def.cpp.

bool stan::lang::is_space ( char  c)

Definition at line 48 of file parser.hpp.

template<typename E >
bool stan::lang::is_type ( const std::exception &  e)

Returns true if the specified exception can be dynamically cast to the template parameter type.

Template Parameters
EType to test.
Parameters
[in]eException to test.
Returns
true if exception can be dynamically cast to type.

Definition at line 25 of file rethrow_located.hpp.

bool stan::lang::is_unary_operator ( const std::string &  name)

Definition at line 349 of file ast_def.cpp.

bool stan::lang::is_unary_postfix_operator ( const std::string &  name)

Definition at line 354 of file ast_def.cpp.

bool stan::lang::is_univariate ( const expr_type et)

Definition at line 934 of file semantic_actions_def.cpp.

bool stan::lang::is_user_defined ( const std::string &  name,
const std::vector< expression > &  args 
)

Definition at line 1897 of file ast_def.cpp.

bool stan::lang::is_user_defined ( const fun fx)

Definition at line 1923 of file ast_def.cpp.

bool stan::lang::is_user_defined_prob_function ( const std::string &  name,
const expression variate,
const std::vector< expression > &  params 
)

Definition at line 1913 of file ast_def.cpp.

bool stan::lang::needs_template_params ( const function_decl_def fun)

Definition at line 4484 of file generator.hpp.

int stan::lang::num_dimss ( std::vector< std::vector< stan::lang::expression > > &  dimss)

Definition at line 80 of file semantic_actions_def.cpp.

std::ostream & stan::lang::operator<< ( std::ostream &  o,
const expr_type et 
)

Definition at line 121 of file ast_def.cpp.

bool stan::lang::parse ( std::ostream *  output_stream,
std::istream &  input,
const std::string &  model_name,
program result 
)
inline

Definition at line 59 of file parser.hpp.

static void stan::lang::print_quoted_expression ( std::ostream &  o,
const expression e 
)
static

Definition at line 450 of file generator.hpp.

void stan::lang::print_signature ( const std::string &  name,
const std::vector< expr_type > &  arg_types,
bool  sampling_error_style,
std::ostream &  msgs 
)

Definition at line 387 of file ast_def.cpp.

static void stan::lang::print_string_literal ( std::ostream &  o,
const std::string &  s 
)
static

Definition at line 439 of file generator.hpp.

void stan::lang::print_var_origin ( std::ostream &  o,
const var_origin vo 
)

Definition at line 1227 of file ast_def.cpp.

expr_type stan::lang::promote_primitive ( const expr_type et)

Definition at line 132 of file ast_def.cpp.

expr_type stan::lang::promote_primitive ( const expr_type et1,
const expr_type et2 
)

Definition at line 138 of file ast_def.cpp.

void stan::lang::replace_suffix ( const std::string &  old_suffix,
const std::string &  new_suffix,
fun f 
)

Definition at line 32 of file semantic_actions_def.cpp.

void stan::lang::rethrow_located ( const std::exception &  e,
int  line 
)

Rethrow an exception of type specified by the dynamic type of the specified exception, adding the specified line number to the specified exception's message.

Parameters
[in]eOriginal exception.
[in]lineLine number in Stan source program where exception originated.

Definition at line 87 of file rethrow_located.hpp.

bool stan::lang::returns_type ( const expr_type return_type,
const statement statement,
std::ostream &  error_msgs 
)

Definition at line 642 of file ast_def.cpp.

void stan::lang::set_fun_type ( fun fun,
std::ostream &  error_msgs 
)

Definition at line 72 of file semantic_actions_def.cpp.

std::string stan::lang::strip_ccdf_suffix ( const std::string &  dist_fun)

Definition at line 2020 of file ast_def.cpp.

std::string stan::lang::strip_cdf_suffix ( const std::string &  dist_fun)

Definition at line 2007 of file ast_def.cpp.

std::string stan::lang::strip_prob_fun_suffix ( const std::string &  dist_fun)

Definition at line 1992 of file ast_def.cpp.

void stan::lang::suppress_warning ( const std::string &  indent,
const std::string &  var_name,
std::ostream &  o 
)

Definition at line 2864 of file generator.hpp.

template<typename T >
std::string stan::lang::to_string ( i)

Definition at line 55 of file generator.hpp.

size_t stan::lang::total_dims ( const std::vector< std::vector< expression > > &  dimss)

Definition at line 1073 of file ast_def.cpp.

bool stan::lang::validate_double_expr ( const expression expr,
std::stringstream &  error_msgs 
)

Definition at line 61 of file semantic_actions_def.cpp.

template<class T >
void stan::lang::validate_integrate_ode_non_control_args ( const T &  ode_fun,
const variable_map var_map,
bool &  pass,
std::ostream &  error_msgs 
)

Definition at line 1306 of file semantic_actions_def.cpp.

std::ostream & stan::lang::write_base_expr_type ( std::ostream &  o,
base_expr_type  type 
)

Definition at line 25 of file ast_def.cpp.

Variable Documentation

boost::phoenix::function< add_conditional_body > stan::lang::add_conditional_body_f

Definition at line 686 of file semantic_actions_def.cpp.

boost::phoenix::function< add_conditional_condition > stan::lang::add_conditional_condition_f

Definition at line 680 of file semantic_actions_def.cpp.

boost::phoenix::function< add_expression_dimss > stan::lang::add_expression_dimss_f

Definition at line 1846 of file semantic_actions_def.cpp.

boost::phoenix::function< add_fun_var > stan::lang::add_fun_var_f

Definition at line 539 of file semantic_actions_def.cpp.

boost::phoenix::function< add_function_signature > stan::lang::add_function_signature_f

Definition at line 448 of file semantic_actions_def.cpp.

boost::phoenix::function< add_idxs > stan::lang::add_idxs_f

Definition at line 1817 of file semantic_actions_def.cpp.

boost::phoenix::function< add_line_number > stan::lang::add_line_number_f

Definition at line 1282 of file semantic_actions_def.cpp.

boost::phoenix::function< add_loop_identifier > stan::lang::add_loop_identifier_f

Definition at line 1220 of file semantic_actions_def.cpp.

boost::phoenix::function< add_lp_var > stan::lang::add_lp_var_f

Definition at line 592 of file semantic_actions_def.cpp.

boost::phoenix::function< add_var > stan::lang::add_var_f

Definition at line 2417 of file semantic_actions_def.cpp.

boost::phoenix::function< add_while_body > stan::lang::add_while_body_f

Definition at line 1205 of file semantic_actions_def.cpp.

boost::phoenix::function< add_while_condition > stan::lang::add_while_condition_f

Definition at line 1199 of file semantic_actions_def.cpp.

boost::phoenix::function< addition_expr3 > stan::lang::addition3_f

Definition at line 143 of file semantic_actions_def.cpp.

boost::phoenix::function< assign_lhs > stan::lang::assign_lhs_f

Definition at line 91 of file semantic_actions_def.cpp.

boost::phoenix::function< binary_op_expr > stan::lang::binary_op_f

Definition at line 244 of file semantic_actions_def.cpp.

boost::phoenix::function< copy_square_cholesky_dimension_if_necessary > stan::lang::copy_square_cholesky_dimension_if_necessary_f

Definition at line 2297 of file semantic_actions_def.cpp.

const int stan::lang::data_origin = 1

Definition at line 78 of file ast.hpp.

boost::phoenix::function< deprecate_increment_log_prob > stan::lang::deprecate_increment_log_prob_f

Definition at line 1248 of file semantic_actions_def.cpp.

boost::phoenix::function< deprecate_old_assignment_op > stan::lang::deprecate_old_assignment_op_f

Definition at line 696 of file semantic_actions_def.cpp.

boost::phoenix::function< deprecated_integrate_ode > stan::lang::deprecated_integrate_ode_f

Definition at line 1303 of file semantic_actions_def.cpp.

const int stan::lang::derived_origin = 5

Definition at line 82 of file ast.hpp.

boost::phoenix::function< division_expr > stan::lang::division_f

Definition at line 1680 of file semantic_actions_def.cpp.

const int stan::lang::DOUBLE_T = 2

Definition at line 70 of file ast.hpp.

boost::phoenix::function< elt_division_expr > stan::lang::elt_division_f

Definition at line 1758 of file semantic_actions_def.cpp.

boost::phoenix::function< elt_multiplication_expr > stan::lang::elt_multiplication_f

Definition at line 1741 of file semantic_actions_def.cpp.

boost::phoenix::function< empty_range > stan::lang::empty_range_f

Definition at line 2303 of file semantic_actions_def.cpp.

boost::phoenix::function< exponentiation_expr > stan::lang::exponentiation_f

Definition at line 1614 of file semantic_actions_def.cpp.

boost::phoenix::function< expression_as_statement > stan::lang::expression_as_statement_f

Definition at line 1178 of file semantic_actions_def.cpp.

const int stan::lang::function_argument_origin = 7

Definition at line 84 of file ast.hpp.

const int stan::lang::function_argument_origin_lp = 8

Definition at line 85 of file ast.hpp.

const int stan::lang::function_argument_origin_rng = 9

Definition at line 86 of file ast.hpp.

boost::phoenix::function< identifier_to_var > stan::lang::identifier_to_var_f

Definition at line 761 of file semantic_actions_def.cpp.

const int stan::lang::ILL_FORMED_T = 6

Definition at line 74 of file ast.hpp.

boost::phoenix::function< increment_size_t > stan::lang::increment_size_t_f

Definition at line 165 of file semantic_actions_def.cpp.

const int stan::lang::INT_T = 1

Definition at line 69 of file ast.hpp.

boost::phoenix::function< is_prob_fun > stan::lang::is_prob_fun_f

Definition at line 127 of file semantic_actions_def.cpp.

boost::phoenix::function< left_division_expr > stan::lang::left_division_f

Definition at line 1724 of file semantic_actions_def.cpp.

const int stan::lang::local_origin = 6

Definition at line 83 of file ast.hpp.

boost::phoenix::function< logical_negate_expr > stan::lang::logical_negate_expr_f

Definition at line 1789 of file semantic_actions_def.cpp.

const int stan::lang::MATRIX_T = 5

Definition at line 73 of file ast.hpp.

const int stan::lang::model_name_origin = 0

Definition at line 77 of file ast.hpp.

boost::phoenix::function< modulus_expr > stan::lang::modulus_f

Definition at line 1702 of file semantic_actions_def.cpp.

boost::phoenix::function< multiplication_expr > stan::lang::multiplication_f

Definition at line 1631 of file semantic_actions_def.cpp.

boost::phoenix::function< negate_expr > stan::lang::negate_expr_f

Definition at line 1773 of file semantic_actions_def.cpp.

const int stan::lang::parameter_origin = 3

Definition at line 80 of file ast.hpp.

boost::phoenix::function< program_error > stan::lang::program_error_f

Definition at line 660 of file semantic_actions_def.cpp.

boost::phoenix::function< remove_loop_identifier > stan::lang::remove_loop_identifier_f

Definition at line 1226 of file semantic_actions_def.cpp.

boost::phoenix::function< remove_lp_var > stan::lang::remove_lp_var_f

Definition at line 598 of file semantic_actions_def.cpp.

const int stan::lang::ROW_VECTOR_T = 4

Definition at line 72 of file ast.hpp.

boost::phoenix::function< scope_lp > stan::lang::scope_lp_f

Definition at line 511 of file semantic_actions_def.cpp.

boost::phoenix::function< set_allows_sampling_origin > stan::lang::set_allows_sampling_origin_f

Definition at line 297 of file semantic_actions_def.cpp.

boost::phoenix::function< set_double_range_lower > stan::lang::set_double_range_lower_f

Definition at line 2370 of file semantic_actions_def.cpp.

boost::phoenix::function< set_double_range_upper > stan::lang::set_double_range_upper_f

Definition at line 2380 of file semantic_actions_def.cpp.

boost::phoenix::function< set_fun_type_named > stan::lang::set_fun_type_named_f

Definition at line 1587 of file semantic_actions_def.cpp.

boost::phoenix::function< set_int_range_lower > stan::lang::set_int_range_lower_f

Definition at line 2327 of file semantic_actions_def.cpp.

boost::phoenix::function< set_int_range_upper > stan::lang::set_int_range_upper_f

Definition at line 2337 of file semantic_actions_def.cpp.

boost::phoenix::function< set_no_op > stan::lang::set_no_op_f

Definition at line 1292 of file semantic_actions_def.cpp.

boost::phoenix::function< set_omni_idx > stan::lang::set_omni_idx_f

Definition at line 545 of file semantic_actions_def.cpp.

boost::phoenix::function< set_var_type > stan::lang::set_var_type_f

Definition at line 1882 of file semantic_actions_def.cpp.

boost::phoenix::function< set_void_function > stan::lang::set_void_function_f

Definition at line 272 of file semantic_actions_def.cpp.

boost::phoenix::function< set_void_return > stan::lang::set_void_return_f

Definition at line 1287 of file semantic_actions_def.cpp.

boost::phoenix::function< subtraction_expr3 > stan::lang::subtraction3_f

Definition at line 160 of file semantic_actions_def.cpp.

const int stan::lang::transformed_data_origin = 2

Definition at line 79 of file ast.hpp.

const int stan::lang::transformed_parameter_origin = 4

Definition at line 81 of file ast.hpp.

boost::phoenix::function< transpose_expr > stan::lang::transpose_f

Definition at line 1802 of file semantic_actions_def.cpp.

boost::phoenix::function< unscope_locals > stan::lang::unscope_locals_f

Definition at line 1185 of file semantic_actions_def.cpp.

boost::phoenix::function< unscope_variables > stan::lang::unscope_variables_f

Definition at line 520 of file semantic_actions_def.cpp.

boost::phoenix::function< validate_allow_sample > stan::lang::validate_allow_sample_f

Definition at line 1261 of file semantic_actions_def.cpp.

boost::phoenix::function< validate_assgn > stan::lang::validate_assgn_f

Definition at line 820 of file semantic_actions_def.cpp.

boost::phoenix::function< validate_assignment > stan::lang::validate_assignment_f

Definition at line 917 of file semantic_actions_def.cpp.

boost::phoenix::function< validate_conditional_op > stan::lang::validate_conditional_op_f

Definition at line 221 of file semantic_actions_def.cpp.

boost::phoenix::function< validate_decl_constraints > stan::lang::validate_decl_constraints_f

Definition at line 2080 of file semantic_actions_def.cpp.

boost::phoenix::function< validate_declarations > stan::lang::validate_declarations_f

Definition at line 320 of file semantic_actions_def.cpp.

boost::phoenix::function< validate_expr_type3 > stan::lang::validate_expr_type3_f

Definition at line 121 of file semantic_actions_def.cpp.

boost::phoenix::function< validate_identifier > stan::lang::validate_identifier_f

Definition at line 2288 of file semantic_actions_def.cpp.

boost::phoenix::function< validate_int_data_expr > stan::lang::validate_int_data_expr_f

Definition at line 2360 of file semantic_actions_def.cpp.

boost::phoenix::function< validate_int_expr > stan::lang::validate_int_expr_f

Definition at line 2317 of file semantic_actions_def.cpp.

boost::phoenix::function< validate_int_expr_warn > stan::lang::validate_int_expr_warn_f

Definition at line 1237 of file semantic_actions_def.cpp.

boost::phoenix::function< validate_int_expression > stan::lang::validate_int_expression_f

Definition at line 552 of file semantic_actions_def.cpp.

boost::phoenix::function< validate_integrate_ode_control > stan::lang::validate_integrate_ode_control_f

Definition at line 1472 of file semantic_actions_def.cpp.

boost::phoenix::function< validate_integrate_ode > stan::lang::validate_integrate_ode_f

Definition at line 1412 of file semantic_actions_def.cpp.

boost::phoenix::function< validate_ints_expression > stan::lang::validate_ints_expression_f

Definition at line 581 of file semantic_actions_def.cpp.

boost::phoenix::function< validate_non_void_arg_function > stan::lang::validate_non_void_arg_f

Definition at line 256 of file semantic_actions_def.cpp.

boost::phoenix::function< validate_non_void_expression > stan::lang::validate_non_void_expression_f

Definition at line 1273 of file semantic_actions_def.cpp.

boost::phoenix::function< validate_pmf_pdf_variate > stan::lang::validate_pmf_pdf_variate_f

Definition at line 480 of file semantic_actions_def.cpp.

boost::phoenix::function< validate_prob_fun > stan::lang::validate_prob_fun_f

Definition at line 374 of file semantic_actions_def.cpp.

boost::phoenix::function< validate_return_allowed > stan::lang::validate_return_allowed_f

Definition at line 710 of file semantic_actions_def.cpp.

boost::phoenix::function< validate_return_type > stan::lang::validate_return_type_f

Definition at line 505 of file semantic_actions_def.cpp.

boost::phoenix::function< validate_sample > stan::lang::validate_sample_f

Definition at line 1141 of file semantic_actions_def.cpp.

boost::phoenix::function< validate_void_return_allowed > stan::lang::validate_void_return_allowed_f

Definition at line 728 of file semantic_actions_def.cpp.

const int stan::lang::VECTOR_T = 3

Definition at line 71 of file ast.hpp.

const int stan::lang::void_function_argument_origin = 10

Definition at line 87 of file ast.hpp.

const int stan::lang::void_function_argument_origin_lp = 11

Definition at line 88 of file ast.hpp.

const int stan::lang::void_function_argument_origin_rng = 12

Definition at line 89 of file ast.hpp.

const int stan::lang::VOID_T = 0

Definition at line 68 of file ast.hpp.


     [ Stan Home Page ] © 2011–2016, Stan Development Team.