1 #ifndef STAN_LANG_AST_NODE_MATRIX_EXPR_HPP
2 #define STAN_LANG_AST_NODE_MATRIX_EXPR_HPP
3 
4 #include <stan/lang/ast/scope.hpp>
5 #include <stan/lang/ast/node/expression.hpp>
6 #include <vector>
7 #include <cstddef>
8 
9 namespace stan {
10   namespace lang {
11 
12     struct expresssion;
13 
14     /**
15      * Structure to hold a matrix expression.
16      */
17     struct matrix_expr {
18       /**
19        * Sequence of expressions for matrix values.
20        */
21       std::vector<expression> args_;
22 
23       /**
24        * True if there is a variable within any of the expressions
25        * that is a parameter, transformed parameter, or non-integer
26        * local variable.
27        */
28       bool has_var_;
29 
30       /**
31        * Scope of this matrix expression.
32        *
33        */
34       scope matrix_expr_scope_;
35 
36       /**
37        * Construct a default matrix expression.
38        */
39       matrix_expr();
40 
41       /**
42        * Construct an matrix expression from the specified sequence of
43        * expressions.
44        *
45        * @param args sequence of arguments
46        */
47       explicit matrix_expr(const std::vector<expression>& args);
48     };
49 
50   }
51 }
52 #endif
53