Stan  2.14.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
 AST node for the type delclaration for function arguments. More...
 
struct  array_expr
 Structure to hold an array expression. More...
 
struct  assgn
 AST node for assignment to variable with multi-indexing. More...
 
struct  assign_lhs
 
struct  assignment
 AST node for assignment statements. More...
 
struct  bare_type_grammar
 
struct  base_var_decl
 AST base class for variable declarations, which share most of their structure. More...
 
struct  binary_op
 Node for storing binary operations consisting of an operation and left and right arguments. More...
 
struct  binary_op_expr
 
struct  break_continue_statement
 AST structure for break and continue statements. More...
 
struct  cholesky_corr_var_decl
 Structure to hold a Cholesky factor for a correlation matrix variable declaration. More...
 
struct  cholesky_factor_var_decl
 Structure to hold a Cholesky factor variable declaration. More...
 
struct  conditional_op
 Structure for the conditional operator. More...
 
struct  conditional_statement
 AST node for conditional statements. More...
 
struct  constrained_param_names_visgen
 
struct  copy_square_cholesky_dimension_if_necessary
 
struct  corr_matrix_var_decl
 Structure to hold a correlation matrix variable declaration. More...
 
struct  cov_matrix_var_decl
 Structure to hold a covariance matrix variable declaration. More...
 
struct  data_only_expression
 
struct  deprecate_increment_log_prob
 
struct  deprecate_old_assignment_op
 
struct  deprecated_integrate_ode
 
struct  distribution
 Structure for a distribution with parameters. More...
 
struct  division_expr
 
struct  double_literal
 Node for holding a double literal. More...
 
struct  double_var_decl
 An integer variable declaration and optional definition. More...
 
struct  dump_member_var_visgen
 
struct  elt_division_expr
 
struct  elt_multiplication_expr
 
struct  empty_range
 
struct  exponentiation_expr
 
struct  expr_type
 Structure of the type of an expression, which consists of a base type and a number of dimensions. More...
 
struct  expression
 
struct  expression07_grammar
 
struct  expression_as_statement
 
struct  expression_grammar
 
struct  expression_type_vis
 Callback functor for calculating expression types from the variant types making up an expression. More...
 
struct  expression_visgen
 
struct  for_statement
 AST node for representing a for statement. More...
 
struct  fun
 Structure for function application. More...
 
struct  function_decl_def
 AST node for a function declaration and definition including return type name, arguments, and body. More...
 
struct  function_decl_defs
 AST node for a sequence of function declarations and definitions. More...
 
class  function_signatures
 This class is a singleton used to store the available functions in the Stan object language and their signatures. More...
 
struct  functions_grammar
 
struct  generate_init_vars_visgen
 
struct  generate_init_visgen
 
struct  generate_local_var_init_nan_visgen
 
struct  has_non_param_var_vis
 Visitor to determine if an expression contains a variable that is not declared as a parameter. More...
 
struct  has_var_vis
 Visitor to detect if an expression contains a non-data variable. More...
 
struct  identifier_to_var
 
struct  idx
 AST variant structure for indexes, holding any of a unary, multi, omni, lower-bound, upper-bound, or lower- and upper-bound index. More...
 
struct  idx_user_visgen
 
struct  idx_visgen
 
struct  increment_log_prob_statement
 AST node for the increment log prob (deprecated) and target increment statements. More...
 
struct  increment_size_t
 
struct  index_op
 Structure for an indexed expression. More...
 
struct  index_op_sliced
 AST structure for holding an expression with a sequence of indexes. More...
 
struct  indexes_grammar
 
struct  init_local_var_visgen
 
struct  int_literal
 
struct  int_var_decl
 An integer variable declaration and optional definition. More...
 
struct  integrate_ode
 Structure for integrate diff eq statement. More...
 
struct  integrate_ode_control
 Structure for a diff eq integration statement with control parameters for the integrator. More...
 
struct  is_multi_index_vis
 Visitor for callback to determine if an index is a multiple index or a single index. More...
 
struct  is_nil_vis
 Callback functor for determining if one of the variant types making up an expression is nil. More...
 
struct  is_no_op_statement_vis
 Visitor to determine if a statement is a no-op statement. More...
 
struct  is_numbered_statement_vis
 
struct  is_prob_fun
 
struct  lb_idx
 AST structure for holding a lower-bound index. More...
 
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
 AST structure for lower and upper bounds. More...
 
struct  matrix_var_decl
 Structure to hold a matrix variable declaration. More...
 
struct  member_var_decl_visgen
 
struct  modulus_expr
 
struct  multi_idx
 
struct  multiplication_expr
 
struct  name_vis
 A visitor for the variant type of variable declarations that returns the name of the variable. More...
 
struct  negate_expr
 
struct  nil
 The nil structure used as a placeholder for undefined or empty values in several structures. More...
 
struct  no_op_statement
 AST node for the no-operation statement. More...
 
struct  non_void_expression
 
struct  omni_idx
 AST structure for representing all legal indexes. More...
 
struct  ordered_var_decl
 Structure to hold the declaration of an ordered vector. More...
 
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
 Structure to hold the declaration of a positive ordered vector. More...
 
struct  print_statement
 AST node for print statements. More...
 
struct  printable
 A printable object is either an expression or a string. More...
 
struct  printable_visgen
 
struct  program
 AST node for a complete Stan program. More...
 
struct  program_error
 
struct  program_grammar
 
struct  range
 AST structure for a range object with a low and high value. More...
 
struct  reject_statement
 AST node for the reject statement. More...
 
struct  remove_loop_identifier
 
struct  remove_lp_var
 
struct  require_vbar
 
struct  return_statement
 AST node for the return statement. More...
 
struct  returns_type_vis
 Visitor for reporting an error message if the statement is not a return statement with a type specified at construction time. More...
 
struct  row_vector_var_decl
 Structure to hold a row vector variable declaration. More...
 
struct  sample
 AST node for sampling statements. More...
 
struct  scope_lp
 
struct  set_allows_sampling_origin
 
struct  set_array_expr_type
 
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
 Structure to hold the declaration of a simplex. More...
 
struct  statement
 Structure to wrap the variant type of statements. More...
 
struct  statement_2_grammar
 
struct  statement_grammar
 
struct  statement_visgen
 
struct  statements
 Holder for local variable declarations and a sequence of statements. More...
 
struct  subtraction_expr3
 
struct  term_grammar
 
struct  transpose_expr
 
struct  ub_idx
 AST structure for holding an upper-bound index. More...
 
struct  unary_op
 AST structure for unary operations consisting of an operation and argument. More...
 
struct  unconstrained_param_names_visgen
 
struct  uni_idx
 AST structure to hold a single array or matrix/vector index. More...
 
struct  unit_vector_var_decl
 Structure to hold the declaration of a unit vector. More...
 
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_definition
 
struct  validate_double_expr
 
struct  validate_expr_type3
 
struct  validate_identifier
 
struct  validate_in_loop
 
struct  validate_int_data_expr
 
struct  validate_int_expr
 
struct  validate_int_expr_silent
 
struct  validate_int_expression_warn
 
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
 The variant structure to hold a variable declaration. More...
 
struct  var_decl_base_type_vis
 Visitor to extract base variable declaration from the variant types of a variable declaration. More...
 
struct  var_decl_def_vis
 Visitor to return the definition in a variable declaration. More...
 
struct  var_decl_dims_vis
 Structure for visitor to extract the dimension sizes in a variable declaration variant type. More...
 
struct  var_decl_has_def_vis
 Variable declaration visitor functor for determining if a variable declaration includes a definition. More...
 
struct  var_decls_grammar
 
struct  var_occurs_vis
 
struct  var_resizing_visgen
 
struct  var_size_validating_visgen
 
struct  variable
 Structure to hold a variable. More...
 
struct  variable_dims
 Structure for holding a variable with its dimension declarations. More...
 
struct  variable_map
 A map from function names to their base declarations and their origin. More...
 
struct  vector_var_decl
 Structure to hold a column vector variable declaration. More...
 
struct  visgen
 generic visitor with output for extension More...
 
struct  while_statement
 AST node for representing while statements. More...
 
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
 The type of a base expression. More...
 
typedef std::pair< expr_type, std::vector< expr_type > > function_signature_t
 The type of a function signature, mapping a vector of argument expression types to a result expression type. More...
 
typedef int var_origin
 The type of a variable indicating where a variable was declared. More...
 
typedef std::string::const_iterator input_iterator_t
 
typedef boost::spirit::line_pos_iterator< input_iterator_tpos_iterator_t
 

Functions

std::ostream & operator<< (std::ostream &o, const expr_type &et)
 Stream a user-readable version of the expression type to the specified output stream, returning the speicifed argument output stream to allow chaining. More...
 
bool ends_with (const std::string &suffix, const std::string &s)
 Returns true if the specified suffix appears at the end of the specified string. More...
 
bool fun_name_exists (const std::string &name)
 Return true if the function name has been declared as a built-in or by the user. More...
 
void generate_expression (const expression &e, std::ostream &o)
 Write the code generated by the specified expression to the specified output stream. More...
 
void generate_expression (const expression &e, bool user_facing, std::ostream &o)
 Write the code generated by the specified expression to the specified output stream, putting it in a user-readable format if the user-facing flag is true. More...
 
std::string get_ccdf (const std::string &dist_name)
 Return the CCDF for the specified distribution. More...
 
std::string get_cdf (const std::string &dist_name)
 Return the name of the CDF for the specified distribution name. More...
 
std::string get_prob_fun (const std::string &dist_name)
 Return the probability function (density or mass) for the specified distribution name. More...
 
bool has_ccdf_suffix (const std::string &name)
 Return true if the specified function name has a suffix indicating it is a CCDF. More...
 
bool has_cdf_suffix (const std::string &name)
 Return true if the specified function name has a suffix indicating it is a CDF. More...
 
bool has_lp_suffix (const std::string &name)
 Return true if the specified string has the suffix "_lp". More...
 
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. More...
 
bool is_linear_function (const std::string &name)
 
bool has_prob_fun_suffix (const std::string &name)
 Return true if the function with the specified name has a suffix indicating it is a probability function. More...
 
bool has_rng_suffix (const std::string &name)
 Return true if the specified string has the suffix "_rng". More...
 
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, defined as a transformed parameter, or is a local variable that is not an integer. More...
 
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...
 
expr_type infer_type_indexing (const base_expr_type &base_type, std::size_t dims, std::size_t num_indexes)
 Return the expression type resulting from indexing an expression of the specified base type and number of dimensions with the specified number of indexes. More...
 
expr_type infer_type_indexing (const expression &expr, std::size_t num_indexes)
 Return the expression type resulting from indexing the specified expression with the specified number of indexes. More...
 
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_assignable (const expr_type &l_type, const expr_type &r_type, const std::string &failure_message, std::ostream &error_msgs)
 Return true if an expression of the right-hand side type is assignable to a variable of the left-hand side type, writing the failure message to the error messages if the asisgnment is not legal. More...
 
bool is_data_origin (const var_origin &vo)
 Return true if the specified variable origin is for variables declared as data or transformed data. More...
 
bool is_fun_origin (const var_origin &vo)
 Return true if the specified variable origin is for variables declared as function arguments. More...
 
bool is_multi_index (const idx &idx)
 Return true if the specified index potentially takes more than one value. More...
 
bool is_nil (const expression &e)
 Return true if the specified expression is nil. More...
 
bool is_user_defined (const fun &fx)
 Return true if the specified function was declared in the functions block. More...
 
bool is_user_defined (const std::string &name, const std::vector< expression > &args)
 Return true if a function with the specified name and arguments was defined in the functions block. More...
 
bool is_user_defined_prob_function (const std::string &name, const expression &variate, const std::vector< expression > &params)
 Return true if a probability function with the specified name, random variate and parameters is user defined. More...
 
void print_var_origin (std::ostream &o, const var_origin &vo)
 Write a user-readable version of the specified variable to origin to the specified output stream. More...
 
expr_type promote_primitive (const expr_type &et)
 
expr_type promote_primitive (const expr_type &et1, const expr_type &et2)
 
bool returns_type (const expr_type &return_type, const statement &statement, std::ostream &error_msgs)
 Return true if the specified statement is a return statement returning an expression of the specified type, otherwise return false and write an error message to the specified error stream. More...
 
std::string strip_ccdf_suffix (const std::string &dist_fun)
 Return the result of removing the suffix from the specified function name indicating it is a CCDF. More...
 
std::string strip_cdf_suffix (const std::string &dist_fun)
 Return the result of removing the suffix from the specified function name indicating it is a CDF. More...
 
std::string strip_prob_fun_suffix (const std::string &dist_fun)
 Return the result of stripping the suffix indicating it is a probability function from the specified function name. More...
 
std::size_t total_dims (const std::vector< std::vector< expression > > &dimss)
 Return the total number of dimensions when the specified vectors of expressions are concatenated. More...
 
std::ostream & write_base_expr_type (std::ostream &o, base_expr_type type)
 Write a user-readable version of the specified base expression type to the specified output stream. More...
 
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 compile (std::ostream *msgs, std::istream &stan_lang_in, std::ostream &cpp_out, const std::string &model_name, const bool allow_undefined=false)
 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_context, std::ostream &o)
 
void generate_bare_type (const expr_type &t, const std::string &scalar_t_name, std::ostream &out)
 
void generate_statement (const statement &s, int indent, std::ostream &o, bool include_sampling, bool is_var_context, bool is_fun_return)
 
void generate_statement (const std::vector< statement > &ss, int indent, std::ostream &o, bool include_sampling, bool is_var_context, bool is_fun_return)
 
const std::string EOL ("\)
 
const std::string EOL2 ("\")
 
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 (const std::string &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_real_var_type (const var_origin &vo, bool has_var, bool is_var_context, std::ostream &o)
 Generate correct C++ type for expressions which contain a Stan real variable according to context in which expression is used and expression contents. More...
 
void generate_array_var_type (const base_expr_type base_type, const std::string &real_var_type, bool is_var_context, std::ostream &o)
 Generate correct C++ type for array expressions according to context in which expression is used. More...
 
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_init_vars (const std::vector< var_decl > &vs, int indent, std::ostream &o)
 
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_context, 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_context, bool is_fun_return)
 
void generate_local_var_init_nan (const std::vector< var_decl > &vs, int indent, std::ostream &o, bool is_var_context, bool is_fun_return)
 
void generate_define_vars (const std::vector< var_decl > &vs, int indent, bool is_var_context, 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_statements (const std::vector< statement > &ss, int indent, std::ostream &o, bool include_sampling, bool is_var_context, 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_context, bool is_fun_return)
 
void generate_located_statements (const std::vector< statement > &ss, int indent, std::ostream &o, bool include_sampling, bool is_var_context, bool is_fun_return)
 
void generate_log_prob (const program &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 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)
 
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)
 
void qualify (fun &f)
 Set original name of specified function to name and add "stan::math::" namespace qualifier to name. More...
 
void qualify_builtins (fun &f)
 Add qualifier "stan::math::" to nullary functions defined in the Stan language. More...
 
void qualify_cpp11_builtins (fun &f)
 Add namespace qualifier stan::math:: to specify Stan versions of functions to avoid ambiguities with versions defined in math.h in the top-level namespace. More...
 
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, const bool allow_undefined=false)
 
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
 Void type. More...
 
const int INT_T = 1
 Integer type. More...
 
const int DOUBLE_T = 2
 Real scalar type. More...
 
const int VECTOR_T = 3
 Column vector type; scalar type is real. More...
 
const int ROW_VECTOR_T = 4
 Row vector type; scalar type is real. More...
 
const int MATRIX_T = 5
 Matrix type; scalar type is real. More...
 
const int ILL_FORMED_T = 6
 Type denoting an ill-formed expression. More...
 
const int model_name_origin = 0
 Origin of variable is the name of the model. More...
 
const int data_origin = 1
 The origin of the variable is the data block. More...
 
const int transformed_data_origin = 2
 The origin of the variable is the transformed data block. More...
 
const int parameter_origin = 3
 The origin of the variable is the parameter block. More...
 
const int transformed_parameter_origin = 4
 The origin of the variable is the transformed parameter block. More...
 
const int derived_origin = 5
 The origin of the variable is ???. More...
 
const int local_origin = 6
 The origin of the variable is as a local variable. More...
 
const int function_argument_origin = 7
 The variable arose as a function argument to a non-void function that does not end in _lp or _rng. More...
 
const int function_argument_origin_lp = 8
 The variable arose as an argument to a non-void function with the _lp suffix. More...
 
const int function_argument_origin_rng = 9
 The variable arose as an argument to a non-void function with the _rng suffix. More...
 
const int void_function_argument_origin = 10
 The variable arose as an argument to a function returning void that does not have the _lp or _rng suffix. More...
 
const int void_function_argument_origin_lp = 11
 The variable arose as an argument to a function returning void with _lp suffix. More...
 
const int void_function_argument_origin_rng = 12
 The variable arose as an argument to a function returning void with an _rng suffix. More...
 
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_expr_silentvalidate_int_expr_silent_f
 
boost::phoenix::function< validate_int_expression_warnvalidate_int_expression_warn_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< 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< set_array_expr_typeset_array_expr_type_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< require_vbarrequire_vbar_f
 
boost::phoenix::function< validate_decl_constraintsvalidate_decl_constraints_f
 
boost::phoenix::function< validate_definitionvalidate_definition_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< validate_double_exprvalidate_double_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
 
boost::phoenix::function< validate_in_loopvalidate_in_loop_f
 
boost::phoenix::function< non_void_expressionnon_void_expression_f
 

Typedef Documentation

§ base_expr_type

The type of a base expression.

This is a typedef rather than an enum to get around forward declaration issues with enums in header files.

Definition at line 12 of file base_expr_type.hpp.

§ function_signature_t

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

The type of a function signature, mapping a vector of argument expression types to a result expression type.

Definition at line 15 of file function_signature_t.hpp.

§ input_iterator_t

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

Definition at line 10 of file iterator_typedefs.hpp.

§ pos_iterator_t

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

Definition at line 11 of file iterator_typedefs.hpp.

§ var_origin

The type of a variable indicating where a variable was declared.

This is a typedef rather than an enum to get around forward declaration issues with enums in header files.

Definition at line 12 of file var_origin.hpp.

Function Documentation

§ compile()

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

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
allow_undefinedPermit undefined functions?
Returns
false if code could not be generated due to syntax error in the Stan model; true otherwise.

Definition at line 29 of file compiler.hpp.

§ deprecate_fun()

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

Definition at line 92 of file semantic_actions_def.cpp.

§ deprecate_suffix()

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

Definition at line 103 of file semantic_actions_def.cpp.

§ EMPTY_EXP_VECTOR()

const std::vector<expression> stan::lang::EMPTY_EXP_VECTOR ( )

§ ends_with()

bool stan::lang::ends_with ( const std::string &  suffix,
const std::string &  s 
)

Returns true if the specified suffix appears at the end of the specified string.

Parameters
suffixsuffix to test
sstring in which to search
Returns
true if the string ends with the suffix

Definition at line 10 of file ends_with_def.hpp.

§ EOL()

const std::string stan::lang::EOL ( "\  )

§ EOL2()

const std::string stan::lang::EOL2 ( "\  )

§ fun_exists()

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 383 of file semantic_actions_def.cpp.

§ fun_name_exists()

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

Return true if the function name has been declared as a built-in or by the user.

Parameters
namename of function
Returns
true if it has been declared

Definition at line 10 of file fun_name_exists_def.hpp.

§ fun_name_to_operator()

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

Definition at line 282 of file function_signatures_def.hpp.

§ fun_scalar_type()

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

Definition at line 4608 of file generator.hpp.

§ generate_arg_decl()

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 4588 of file generator.hpp.

§ generate_array_var_type()

void stan::lang::generate_array_var_type ( const base_expr_type  base_type,
const std::string &  real_var_type,
bool  is_var_context,
std::ostream &  o 
)

Generate correct C++ type for array expressions according to context in which expression is used.

Generated typename may be embedded in angle brackets, add trailing space accordingly.

Parameters
base_typeexpression base type
real_var_typecontext-dependent real type
is_var_contexttrue when in auto-diff context
ogenerated typename

Definition at line 238 of file generator.hpp.

§ generate_bare_type()

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

Definition at line 4540 of file generator.hpp.

§ generate_catch_throw_located()

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

Definition at line 2356 of file generator.hpp.

§ generate_class_decl()

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

Definition at line 605 of file generator.hpp.

§ generate_comment()

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

Definition at line 102 of file generator.hpp.

§ generate_constrained_param_names_method()

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

Definition at line 3905 of file generator.hpp.

§ generate_constructor()

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

Definition at line 3218 of file generator.hpp.

§ generate_cpp()

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

Definition at line 4933 of file generator.hpp.

§ generate_define_vars()

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

Definition at line 1748 of file generator.hpp.

§ generate_destructor()

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

Definition at line 3026 of file generator.hpp.

§ generate_dims_method()

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

Definition at line 3686 of file generator.hpp.

§ generate_eigen_index_expression()

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

Definition at line 615 of file generator.hpp.

§ generate_end_class_decl()

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

Definition at line 610 of file generator.hpp.

§ generate_end_namespace()

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

Definition at line 98 of file generator.hpp.

§ generate_expression() [1/3]

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

Write the code generated by the specified expression to the specified output stream.

This is just the header for a forward declaration defined in the generator.

Parameters
[in]eexpression to write
[in,out]ostream to which expression is written

Definition at line 515 of file generator.hpp.

§ generate_expression() [2/3]

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

Definition at line 498 of file generator.hpp.

§ generate_expression() [3/3]

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

Write the code generated by the specified expression to the specified output stream, putting it in a user-readable format if the user-facing flag is true.

This is just the header for a forward declaration defined in the generator.

Parameters
[in]eexpression to write
[in]user_facingtrue if expression should be written so that a user can understand it
[in,out]ostream to which expression is written

Definition at line 507 of file generator.hpp.

§ generate_function()

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 4857 of file generator.hpp.

§ generate_function_arguments()

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 4719 of file generator.hpp.

§ generate_function_body()

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

Definition at line 4774 of file generator.hpp.

§ generate_function_functor()

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

Definition at line 4879 of file generator.hpp.

§ generate_function_inline_return_type()

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 4704 of file generator.hpp.

§ generate_function_name()

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

Definition at line 4713 of file generator.hpp.

§ generate_function_template_parameters()

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 4657 of file generator.hpp.

§ generate_functions()

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

Definition at line 4913 of file generator.hpp.

§ generate_functor_arguments()

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 4748 of file generator.hpp.

§ generate_globals()

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

Definition at line 4927 of file generator.hpp.

§ generate_idx()

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

Definition at line 1932 of file generator.hpp.

§ generate_idx_user()

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

Definition at line 1981 of file generator.hpp.

§ generate_idxs() [1/2]

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

Definition at line 1950 of file generator.hpp.

§ generate_idxs() [2/2]

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

Definition at line 1937 of file generator.hpp.

§ generate_idxs_user()

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

Definition at line 1986 of file generator.hpp.

§ generate_include()

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

Definition at line 591 of file generator.hpp.

§ generate_includes()

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

Definition at line 595 of file generator.hpp.

§ generate_indent()

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

Definition at line 73 of file generator.hpp.

§ generate_indexed_expr()

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 143 of file generator.hpp.

§ generate_indexed_expr_user()

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 127 of file generator.hpp.

§ generate_init_method()

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

Definition at line 3548 of file generator.hpp.

§ generate_init_vars()

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

Definition at line 750 of file generator.hpp.

§ generate_initialization()

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 900 of file generator.hpp.

§ generate_initializer()

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 622 of file generator.hpp.

§ generate_local_var_decls()

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

Definition at line 1711 of file generator.hpp.

§ generate_local_var_init_nan()

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

Definition at line 1736 of file generator.hpp.

§ generate_local_var_inits()

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

Definition at line 1255 of file generator.hpp.

§ generate_located_statement()

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

Definition at line 2375 of file generator.hpp.

§ generate_located_statements()

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

Definition at line 2387 of file generator.hpp.

§ generate_log_prob()

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

Definition at line 2402 of file generator.hpp.

§ generate_member_var_decls()

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

Definition at line 1476 of file generator.hpp.

§ generate_member_var_decls_all()

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

Definition at line 4921 of file generator.hpp.

§ generate_member_var_inits()

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

Definition at line 3019 of file generator.hpp.

§ generate_model_name_method()

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

Definition at line 4527 of file generator.hpp.

§ generate_model_typedef()

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

Definition at line 4534 of file generator.hpp.

§ generate_param_names_method()

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

Definition at line 3766 of file generator.hpp.

§ generate_printable()

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

Definition at line 549 of file generator.hpp.

§ generate_private_decl()

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

Definition at line 1274 of file generator.hpp.

§ generate_propto_default_function()

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

Definition at line 4836 of file generator.hpp.

§ generate_propto_default_function_body()

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

Definition at line 4819 of file generator.hpp.

§ generate_public_decl()

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

Definition at line 1270 of file generator.hpp.

§ generate_quoted_string()

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 118 of file generator.hpp.

§ generate_real_var_type()

void stan::lang::generate_real_var_type ( const var_origin vo,
bool  has_var,
bool  is_var_context,
std::ostream &  o 
)

Generate correct C++ type for expressions which contain a Stan real variable according to context in which expression is used and expression contents.

Parameters
voexpression origin block
has_vardoes expression contains a variable?
is_var_contexttrue when in auto-diff context
ogenerated typename

Definition at line 214 of file generator.hpp.

§ generate_set_param_ranges()

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

Definition at line 3209 of file generator.hpp.

§ generate_start_namespace()

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

Definition at line 93 of file generator.hpp.

§ generate_statement() [1/2]

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

Definition at line 2319 of file generator.hpp.

§ generate_statement() [2/2]

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

§ generate_statements()

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

Definition at line 2337 of file generator.hpp.

§ generate_try()

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

Definition at line 2349 of file generator.hpp.

§ generate_type()

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

Definition at line 192 of file generator.hpp.

§ generate_typedef()

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

Definition at line 575 of file generator.hpp.

§ generate_typedefs()

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

Definition at line 582 of file generator.hpp.

§ generate_unconstrained_param_names_method()

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

Definition at line 4087 of file generator.hpp.

§ generate_using()

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

Definition at line 554 of file generator.hpp.

§ generate_using_namespace()

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

Definition at line 558 of file generator.hpp.

§ generate_usings()

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

Definition at line 563 of file generator.hpp.

§ generate_validate_context_size()

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 654 of file generator.hpp.

§ generate_validate_positive()

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

Definition at line 889 of file generator.hpp.

§ generate_validate_transformed_params()

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

Definition at line 1888 of file generator.hpp.

§ generate_validate_var_decl()

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

Definition at line 1395 of file generator.hpp.

§ generate_validate_var_decls()

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

Definition at line 1402 of file generator.hpp.

§ generate_var_resizing()

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

Definition at line 970 of file generator.hpp.

§ generate_version_comment()

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

Definition at line 600 of file generator.hpp.

§ generate_void_statement()

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

Definition at line 78 of file generator.hpp.

§ generate_write_array_method()

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

Definition at line 4410 of file generator.hpp.

§ get_ccdf()

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

Return the CCDF for the specified distribution.

Parameters
[in]dist_namename of distribution
Returns
CCDF for distribution

Definition at line 10 of file get_ccdf_def.hpp.

§ get_cdf()

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

Return the name of the CDF for the specified distribution name.

Parameters
dist_namename of distribution
Returns
name of CDF

Definition at line 10 of file get_cdf_def.hpp.

§ get_prob_fun()

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

Return the probability function (density or mass) for the specified distribution name.

Parameters
[in]dist_namename of distribution
Returns
probability function for distribution

Definition at line 10 of file get_prob_fun_def.hpp.

§ has_ccdf_suffix()

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

Return true if the specified function name has a suffix indicating it is a CCDF.

Parameters
[in]nameof function
Returns
true if the function has a suffix indicating it is a CCDF

Definition at line 10 of file has_ccdf_suffix_def.hpp.

§ has_cdf_suffix()

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

Return true if the specified function name has a suffix indicating it is a CDF.

Parameters
[in]nameof function
Returns
true if the function has a suffix indicating it is a CDF

Definition at line 10 of file has_cdf_suffix_def.hpp.

§ has_lb()

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

Definition at line 62 of file generator.hpp.

§ has_lp_suffix()

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

Return true if the specified string has the suffix "_lp".

Parameters
[in]namefunction name

Definition at line 10 of file has_lp_suffix_def.hpp.

§ has_lub()

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

Definition at line 54 of file generator.hpp.

§ has_non_param_var()

bool stan::lang::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.

This is either a transformed variable or a local variable or a non-linear function of a parameter.

Compare to has_var, which is similar, but just tests for inclusion of variables declared in the parameters, transformed parameters, or model block.

Parameters
eExpression to test.
var_mapVariable mapping for origin and types of variables.
Returns
true if expression contains a variable defined as a transformed parameter, or is a local variable that is not an integer.

Definition at line 10 of file has_non_param_var_def.hpp.

§ has_only_int_args()

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

Definition at line 4601 of file generator.hpp.

§ has_prob_fun_suffix()

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

Return true if the function with the specified name has a suffix indicating it is a probability function.

Parameters
[in]namefunction name
Returns
true if function anme has a suffix indicating it is a probability function

Definition at line 10 of file has_prob_fun_suffix_def.hpp.

§ has_prob_suffix()

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

Definition at line 79 of file semantic_actions_def.cpp.

§ has_rng_suffix()

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

Return true if the specified string has the suffix "_rng".

Parameters
[in]namefunction name

Definition at line 10 of file has_rng_suffix_def.hpp.

§ has_ub()

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

Definition at line 58 of file generator.hpp.

§ has_var()

bool stan::lang::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, defined as a transformed parameter, or is a local variable that is not an integer.

Compare to has_nonparam_var, which is similar, but excludes variables declared as parameters.

Parameters
eExpression to test.
var_mapVariable mapping for origin and types of variables.
Returns
true if expression contains a variable defined as as a parameter, defined as a transformedparameter, or is a local variable that is not an integer.

Definition at line 10 of file has_var_def.hpp.

§ INDENT()

const std::string stan::lang::INDENT ( " "  )

§ INDENT2()

const std::string stan::lang::INDENT2 ( " "  )

§ INDENT3()

const std::string stan::lang::INDENT3 ( " "  )

§ indexed_type()

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 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.

Definition at line 10 of file indexed_type_def.hpp.

§ infer_type_indexing() [1/4]

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 10 of file infer_type_indexing_def.hpp.

§ infer_type_indexing() [2/4]

expr_type stan::lang::infer_type_indexing ( const base_expr_type base_type,
std::size_t  dims,
std::size_t  num_indexes 
)

Return the expression type resulting from indexing an expression of the specified base type and number of dimensions with the specified number of indexes.

Parameters
base_typebase type of expression being indexed
dimsnumber of dimensions of the expression being indexed
num_indexesnumber of indexes provided
Returns
expression type of indexed expression

§ infer_type_indexing() [3/4]

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

Definition at line 29 of file infer_type_indexing_def.hpp.

§ infer_type_indexing() [4/4]

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

Return the expression type resulting from indexing the specified expression with the specified number of indexes.

Parameters
exprexpression being indexed
num_indexesnumber of indexes provided
Returns
expression type of indexed expression

§ is_assignable()

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

Return true if an expression of the right-hand side type is assignable to a variable of the left-hand side type, writing the failure message to the error messages if the asisgnment is not legal.

Parameters
[in]l_typetype of expression being assigned to
[in]r_typetype of value expression
[in]failure_messagemessage to write if assignment is not possible
[in,out]error_msgsstream to which error messages are written
Returns
true if the assignment is legal

Definition at line 11 of file is_assignable_def.hpp.

§ is_binary_operator()

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

Definition at line 252 of file function_signatures_def.hpp.

§ is_data_origin()

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

Return true if the specified variable origin is for variables declared as data or transformed data.

Parameters
vovariable origin
Returns
true if origin for variables declared as data

Definition at line 9 of file is_data_origin_def.hpp.

§ is_defined()

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

Definition at line 996 of file semantic_actions_def.cpp.

§ is_double_return()

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 1003 of file semantic_actions_def.cpp.

§ is_fun_origin()

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

Return true if the specified variable origin is for variables declared as function arguments.

Parameters
vovariable origin
Returns
true if the origin is for function argument variables

Definition at line 9 of file is_fun_origin_def.hpp.

§ is_linear_function()

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

Definition at line 11 of file has_non_param_var_vis_def.hpp.

§ is_multi_index()

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

Return true if the specified index potentially takes more than one value.

Parameters
idxindex
Returns
true if index is not a unary index

Definition at line 10 of file is_multi_index_def.hpp.

§ is_nil()

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

Return true if the specified expression is nil.

Parameters
eexpression to test
Returns
true if expression is nil

Definition at line 10 of file is_nil_def.hpp.

§ is_nonempty()

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

Definition at line 52 of file parser.hpp.

§ is_operator()

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

Definition at line 273 of file function_signatures_def.hpp.

§ is_space()

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

Definition at line 48 of file parser.hpp.

§ is_type()

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.

§ is_unary_operator()

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

Definition at line 264 of file function_signatures_def.hpp.

§ is_unary_postfix_operator()

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

Definition at line 269 of file function_signatures_def.hpp.

§ is_univariate()

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

Definition at line 1011 of file semantic_actions_def.cpp.

§ is_user_defined() [1/2]

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

Return true if the specified function was declared in the functions block.

Parameters
[in]fxfunction with arguments

Definition at line 12 of file is_user_defined_def.hpp.

§ is_user_defined() [2/2]

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

Return true if a function with the specified name and arguments was defined in the functions block.

Parameters
[in]namefunction name
[in]argsfunction arguments
Returns
true if function is defined in the functions block

Definition at line 16 of file is_user_defined_def.hpp.

§ is_user_defined_prob_function()

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

Return true if a probability function with the specified name, random variate and parameters is user defined.

Parameters
[in]namefunction name
[in]variaterandom variable for probability function
[in]paramsparameters to probability function

Definition at line 11 of file is_user_defined_prob_function_def.hpp.

§ needs_template_params()

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

Definition at line 4647 of file generator.hpp.

§ num_dimss()

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

Definition at line 136 of file semantic_actions_def.cpp.

§ operator<<()

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

Stream a user-readable version of the expression type to the specified output stream, returning the speicifed argument output stream to allow chaining.

Parameters
ooutput stream
etexpression type
Returns
argument output stream

Definition at line 76 of file expr_type_def.hpp.

§ parse()

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

Definition at line 59 of file parser.hpp.

§ print_quoted_expression()

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

Definition at line 532 of file generator.hpp.

§ print_signature()

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 305 of file function_signatures_def.hpp.

§ print_string_literal()

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

Definition at line 521 of file generator.hpp.

§ print_var_origin()

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

Write a user-readable version of the specified variable to origin to the specified output stream.

Parameters
ooutput stream
vovariable origin

Definition at line 9 of file print_var_origin_def.hpp.

§ promote_primitive() [1/2]

expr_type stan::lang::promote_primitive ( const expr_type et)
Parameters
etexpression type
Returns
promoted expression type

Definition at line 10 of file promote_primitive_def.hpp.

§ promote_primitive() [2/2]

expr_type stan::lang::promote_primitive ( const expr_type et1,
const expr_type et2 
)
Parameters
et1first expression type
et2second expression type
Returns
promoted expression type

Definition at line 16 of file promote_primitive_def.hpp.

§ qualify()

void stan::lang::qualify ( fun f)

Set original name of specified function to name and add "stan::math::" namespace qualifier to name.

Parameters
[in,out]fFunction to qualify.

Definition at line 33 of file semantic_actions_def.cpp.

§ qualify_builtins()

void stan::lang::qualify_builtins ( fun f)

Add qualifier "stan::math::" to nullary functions defined in the Stan language.

Sets original name of specified function to name and add "stan::math::" namespace qualifier to name.

Parameters
[in,out]fFunction to qualify.

Definition at line 45 of file semantic_actions_def.cpp.

§ qualify_cpp11_builtins()

void stan::lang::qualify_cpp11_builtins ( fun f)

Add namespace qualifier stan::math:: to specify Stan versions of functions to avoid ambiguities with versions defined in math.h in the top-level namespace.

Sets original name of specified function to name and add stan::math:: namespace qualifier to name.

Parameters
[in,out]fFunction to qualify.

Definition at line 63 of file semantic_actions_def.cpp.

§ replace_suffix()

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

Definition at line 84 of file semantic_actions_def.cpp.

§ rethrow_located()

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.

§ returns_type()

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

Return true if the specified statement is a return statement returning an expression of the specified type, otherwise return false and write an error message to the specified error stream.

Parameters
[in]return_typeexpected type of returned expression
[in]statementstatement to test
[in,out]error_msgsstream to which error messages are written
Returns
true if the specified statement is a return statement with a return expression of the specified type

Definition at line 14 of file returns_type_def.hpp.

§ set_fun_type()

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

Definition at line 128 of file semantic_actions_def.cpp.

§ strip_ccdf_suffix()

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

Return the result of removing the suffix from the specified function name indicating it is a CCDF.

Parameters
[in]dist_funname of function
Returns
result of removing suffix from function

Definition at line 10 of file strip_ccdf_suffix_def.hpp.

§ strip_cdf_suffix()

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

Return the result of removing the suffix from the specified function name indicating it is a CDF.

Parameters
[in]dist_funname of function
Returns
result of removing suffix from function

Definition at line 10 of file strip_cdf_suffix_def.hpp.

§ strip_prob_fun_suffix()

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

Return the result of stripping the suffix indicating it is a probability function from the specified function name.

Parameters
[in]dist_funname of probability function
Returns
the probability function with the suffix stripped off

Definition at line 10 of file strip_prob_fun_suffix_def.hpp.

§ suppress_warning()

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

Definition at line 3010 of file generator.hpp.

§ to_string()

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

Definition at line 67 of file generator.hpp.

§ total_dims()

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

Return the total number of dimensions when the specified vectors of expressions are concatenated.

Parameters
dimssvector of vector of dimension expressions

Definition at line 10 of file total_dims_def.hpp.

§ validate_integrate_ode_non_control_args()

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 1390 of file semantic_actions_def.cpp.

§ write_base_expr_type()

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

Write a user-readable version of the specified base expression type to the specified output stream.

Parameters
ooutput stream
typebase expression type

Definition at line 9 of file write_base_expr_type_def.hpp.

Variable Documentation

§ add_conditional_body_f

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

Definition at line 763 of file semantic_actions_def.cpp.

§ add_conditional_condition_f

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

Definition at line 757 of file semantic_actions_def.cpp.

§ add_expression_dimss_f

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

Definition at line 1994 of file semantic_actions_def.cpp.

§ add_fun_var_f

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

Definition at line 600 of file semantic_actions_def.cpp.

§ add_function_signature_f

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

Definition at line 509 of file semantic_actions_def.cpp.

§ add_idxs_f

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

Definition at line 1965 of file semantic_actions_def.cpp.

§ add_line_number_f

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

Definition at line 1366 of file semantic_actions_def.cpp.

§ add_loop_identifier_f

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

Definition at line 1301 of file semantic_actions_def.cpp.

§ add_lp_var_f

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

Definition at line 669 of file semantic_actions_def.cpp.

§ add_var_f

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

Definition at line 2619 of file semantic_actions_def.cpp.

§ add_while_body_f

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

Definition at line 1286 of file semantic_actions_def.cpp.

§ add_while_condition_f

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

Definition at line 1280 of file semantic_actions_def.cpp.

§ addition3_f

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

Definition at line 201 of file semantic_actions_def.cpp.

§ assign_lhs_f

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

Definition at line 147 of file semantic_actions_def.cpp.

§ binary_op_f

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

Definition at line 301 of file semantic_actions_def.cpp.

§ copy_square_cholesky_dimension_if_necessary_f

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

Definition at line 2508 of file semantic_actions_def.cpp.

§ data_origin

const int stan::lang::data_origin = 1

The origin of the variable is the data block.

Definition at line 22 of file var_origin.hpp.

§ deprecate_increment_log_prob_f

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

Definition at line 1332 of file semantic_actions_def.cpp.

§ deprecate_old_assignment_op_f

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

Definition at line 773 of file semantic_actions_def.cpp.

§ deprecated_integrate_ode_f

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

Definition at line 1387 of file semantic_actions_def.cpp.

§ derived_origin

const int stan::lang::derived_origin = 5

The origin of the variable is ???.

Definition at line 42 of file var_origin.hpp.

§ division_f

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

Definition at line 1828 of file semantic_actions_def.cpp.

§ DOUBLE_T

const int stan::lang::DOUBLE_T = 2

Real scalar type.

Definition at line 27 of file base_expr_type.hpp.

§ elt_division_f

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

Definition at line 1906 of file semantic_actions_def.cpp.

§ elt_multiplication_f

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

Definition at line 1889 of file semantic_actions_def.cpp.

§ empty_range_f

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

Definition at line 2514 of file semantic_actions_def.cpp.

§ exponentiation_f

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

Definition at line 1762 of file semantic_actions_def.cpp.

§ expression_as_statement_f

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

Definition at line 1259 of file semantic_actions_def.cpp.

§ function_argument_origin

const int stan::lang::function_argument_origin = 7

The variable arose as a function argument to a non-void function that does not end in _lp or _rng.

Definition at line 53 of file var_origin.hpp.

§ function_argument_origin_lp

const int stan::lang::function_argument_origin_lp = 8

The variable arose as an argument to a non-void function with the _lp suffix.

Definition at line 59 of file var_origin.hpp.

§ function_argument_origin_rng

const int stan::lang::function_argument_origin_rng = 9

The variable arose as an argument to a non-void function with the _rng suffix.

Definition at line 65 of file var_origin.hpp.

§ identifier_to_var_f

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

Definition at line 838 of file semantic_actions_def.cpp.

§ ILL_FORMED_T

const int stan::lang::ILL_FORMED_T = 6

Type denoting an ill-formed expression.

Used as a return for functions.

Definition at line 48 of file base_expr_type.hpp.

§ increment_size_t_f

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

Definition at line 223 of file semantic_actions_def.cpp.

§ INT_T

const int stan::lang::INT_T = 1

Integer type.

Definition at line 22 of file base_expr_type.hpp.

§ is_prob_fun_f

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

Definition at line 185 of file semantic_actions_def.cpp.

§ left_division_f

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

Definition at line 1872 of file semantic_actions_def.cpp.

§ local_origin

const int stan::lang::local_origin = 6

The origin of the variable is as a local variable.

Definition at line 47 of file var_origin.hpp.

§ logical_negate_expr_f

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

Definition at line 1937 of file semantic_actions_def.cpp.

§ MATRIX_T

const int stan::lang::MATRIX_T = 5

Matrix type; scalar type is real.

Definition at line 42 of file base_expr_type.hpp.

§ model_name_origin

const int stan::lang::model_name_origin = 0

Origin of variable is the name of the model.

Definition at line 17 of file var_origin.hpp.

§ modulus_f

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

Definition at line 1850 of file semantic_actions_def.cpp.

§ multiplication_f

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

Definition at line 1779 of file semantic_actions_def.cpp.

§ negate_expr_f

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

Definition at line 1921 of file semantic_actions_def.cpp.

§ non_void_expression_f

boost::phoenix::function< non_void_expression > stan::lang::non_void_expression_f

Definition at line 2682 of file semantic_actions_def.cpp.

§ parameter_origin

const int stan::lang::parameter_origin = 3

The origin of the variable is the parameter block.

Definition at line 32 of file var_origin.hpp.

§ program_error_f

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

Definition at line 737 of file semantic_actions_def.cpp.

§ remove_loop_identifier_f

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

Definition at line 1307 of file semantic_actions_def.cpp.

§ remove_lp_var_f

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

Definition at line 675 of file semantic_actions_def.cpp.

§ require_vbar_f

boost::phoenix::function< require_vbar > stan::lang::require_vbar_f

Definition at line 2039 of file semantic_actions_def.cpp.

§ ROW_VECTOR_T

const int stan::lang::ROW_VECTOR_T = 4

Row vector type; scalar type is real.

Definition at line 37 of file base_expr_type.hpp.

§ scope_lp_f

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

Definition at line 572 of file semantic_actions_def.cpp.

§ set_allows_sampling_origin_f

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

Definition at line 354 of file semantic_actions_def.cpp.

§ set_array_expr_type_f

boost::phoenix::function< set_array_expr_type > stan::lang::set_array_expr_type_f

Definition at line 1735 of file semantic_actions_def.cpp.

§ set_double_range_lower_f

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

Definition at line 2572 of file semantic_actions_def.cpp.

§ set_double_range_upper_f

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

Definition at line 2583 of file semantic_actions_def.cpp.

§ set_fun_type_named_f

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

Definition at line 1686 of file semantic_actions_def.cpp.

§ set_int_range_lower_f

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

Definition at line 2524 of file semantic_actions_def.cpp.

§ set_int_range_upper_f

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

Definition at line 2534 of file semantic_actions_def.cpp.

§ set_no_op_f

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

Definition at line 1376 of file semantic_actions_def.cpp.

§ set_omni_idx_f

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

Definition at line 606 of file semantic_actions_def.cpp.

§ set_var_type_f

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

Definition at line 2030 of file semantic_actions_def.cpp.

§ set_void_function_f

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

Definition at line 329 of file semantic_actions_def.cpp.

§ set_void_return_f

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

Definition at line 1371 of file semantic_actions_def.cpp.

§ subtraction3_f

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

Definition at line 218 of file semantic_actions_def.cpp.

§ transformed_data_origin

const int stan::lang::transformed_data_origin = 2

The origin of the variable is the transformed data block.

Definition at line 27 of file var_origin.hpp.

§ transformed_parameter_origin

const int stan::lang::transformed_parameter_origin = 4

The origin of the variable is the transformed parameter block.

Definition at line 37 of file var_origin.hpp.

§ transpose_f

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

Definition at line 1950 of file semantic_actions_def.cpp.

§ unscope_locals_f

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

Definition at line 1266 of file semantic_actions_def.cpp.

§ unscope_variables_f

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

Definition at line 581 of file semantic_actions_def.cpp.

§ validate_allow_sample_f

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

Definition at line 1345 of file semantic_actions_def.cpp.

§ validate_assgn_f

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

Definition at line 897 of file semantic_actions_def.cpp.

§ validate_assignment_f

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

Definition at line 994 of file semantic_actions_def.cpp.

§ validate_conditional_op_f

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

Definition at line 278 of file semantic_actions_def.cpp.

§ validate_decl_constraints_f

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

Definition at line 2240 of file semantic_actions_def.cpp.

§ validate_declarations_f

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

Definition at line 380 of file semantic_actions_def.cpp.

§ validate_definition_f

boost::phoenix::function< validate_definition > stan::lang::validate_definition_f

Definition at line 2289 of file semantic_actions_def.cpp.

§ validate_double_expr_f

boost::phoenix::function< validate_double_expr > stan::lang::validate_double_expr_f

Definition at line 126 of file semantic_actions_def.cpp.

§ validate_expr_type3_f

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

Definition at line 179 of file semantic_actions_def.cpp.

§ validate_identifier_f

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

Definition at line 2499 of file semantic_actions_def.cpp.

§ validate_in_loop_f

boost::phoenix::function< validate_in_loop > stan::lang::validate_in_loop_f

Definition at line 2671 of file semantic_actions_def.cpp.

§ validate_int_data_expr_f

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

Definition at line 2561 of file semantic_actions_def.cpp.

§ validate_int_expr_f

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

Definition at line 1321 of file semantic_actions_def.cpp.

§ validate_int_expr_silent_f

boost::phoenix::function< validate_int_expr_silent > stan::lang::validate_int_expr_silent_f

Definition at line 613 of file semantic_actions_def.cpp.

§ validate_int_expression_warn_f

boost::phoenix::function< validate_int_expression_warn > stan::lang::validate_int_expression_warn_f

Definition at line 628 of file semantic_actions_def.cpp.

§ validate_integrate_ode_control_f

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

Definition at line 1557 of file semantic_actions_def.cpp.

§ validate_integrate_ode_f

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

Definition at line 1497 of file semantic_actions_def.cpp.

§ validate_ints_expression_f

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

Definition at line 658 of file semantic_actions_def.cpp.

§ validate_non_void_arg_f

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

Definition at line 313 of file semantic_actions_def.cpp.

§ validate_non_void_expression_f

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

Definition at line 1357 of file semantic_actions_def.cpp.

§ validate_pmf_pdf_variate_f

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

Definition at line 541 of file semantic_actions_def.cpp.

§ validate_prob_fun_f

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

Definition at line 435 of file semantic_actions_def.cpp.

§ validate_return_allowed_f

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

Definition at line 787 of file semantic_actions_def.cpp.

§ validate_return_type_f

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

Definition at line 566 of file semantic_actions_def.cpp.

§ validate_sample_f

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

Definition at line 1222 of file semantic_actions_def.cpp.

§ validate_void_return_allowed_f

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

Definition at line 805 of file semantic_actions_def.cpp.

§ VECTOR_T

const int stan::lang::VECTOR_T = 3

Column vector type; scalar type is real.

Definition at line 32 of file base_expr_type.hpp.

§ void_function_argument_origin

const int stan::lang::void_function_argument_origin = 10

The variable arose as an argument to a function returning void that does not have the _lp or _rng suffix.

Definition at line 71 of file var_origin.hpp.

§ void_function_argument_origin_lp

const int stan::lang::void_function_argument_origin_lp = 11

The variable arose as an argument to a function returning void with _lp suffix.

function returning void

Definition at line 77 of file var_origin.hpp.

§ void_function_argument_origin_rng

const int stan::lang::void_function_argument_origin_rng = 12

The variable arose as an argument to a function returning void with an _rng suffix.

Definition at line 83 of file var_origin.hpp.

§ VOID_T

const int stan::lang::VOID_T = 0

Void type.

Used as return type for void functions.

Definition at line 17 of file base_expr_type.hpp.


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