Stan  2.14.0
probability, sampling & optimization
expression_type_vis.hpp
Go to the documentation of this file.
1 #ifndef STAN_LANG_AST_NODE_EXPRESSION_TYPE_VIS_HPP
2 #define STAN_LANG_AST_NODE_EXPRESSION_TYPE_VIS_HPP
3 
5 #include <boost/variant/static_visitor.hpp>
6 
7 namespace stan {
8  namespace lang {
9 
10  struct nil;
11  struct int_literal;
12  struct double_literal;
13  struct array_expr;
14  struct variable;
15  struct fun;
16  struct integrate_ode;
17  struct integrate_ode_control;
18  struct index_op;
19  struct index_op_sliced;
20  struct conditional_op;
21  struct binary_op;
22  struct unary_op;
23 
28  struct expression_type_vis : public boost::static_visitor<expr_type> {
29  expr_type operator()(const nil& e) const;
30  expr_type operator()(const int_literal& e) const;
31  expr_type operator()(const double_literal& e) const;
32  expr_type operator()(const array_expr& e) const;
33  expr_type operator()(const variable& e) const;
34  expr_type operator()(const fun& e) const;
35  expr_type operator()(const integrate_ode& e) const;
37  expr_type operator()(const index_op& e) const;
38  expr_type operator()(const index_op_sliced& e) const;
39  expr_type operator()(const conditional_op& e) const;
40  expr_type operator()(const binary_op& e) const;
41  expr_type operator()(const unary_op& e) const;
42  };
43 
44  }
45 }
46 #endif
Node for holding a double literal.
Probability, optimization and sampling library.
Structure to hold an array expression.
Definition: array_expr.hpp:17
Structure for an indexed expression.
Definition: index_op.hpp:14
Callback functor for calculating expression types from the variant types making up an expression...
expr_type operator()(const nil &e) const
Structure for function application.
Definition: fun.hpp:17
Structure of the type of an expression, which consists of a base type and a number of dimensions...
Definition: expr_type.hpp:14
Structure for integrate diff eq statement.
AST structure for holding an expression with a sequence of indexes.
Structure for the conditional operator.
Structure to hold a variable.
Definition: variable.hpp:14
AST structure for unary operations consisting of an operation and argument.
Definition: unary_op.hpp:14
Node for storing binary operations consisting of an operation and left and right arguments.
Definition: binary_op.hpp:15
The nil structure used as a placeholder for undefined or empty values in several structures.
Definition: nil.hpp:11
Structure for a diff eq integration statement with control parameters for the integrator.

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