Stan  2.14.0
probability, sampling & optimization
assgn.hpp
Go to the documentation of this file.
1 #ifndef STAN_LANG_AST_NODE_ASSIGN_HPP
2 #define STAN_LANG_AST_NODE_ASSIGN_HPP
3 
7 #include <vector>
8 
9 namespace stan {
10  namespace lang {
11 
15  struct assgn {
19  assgn();
20 
30  assgn(const variable& lhs_var, const std::vector<idx>& idxs,
31  const expression& rhs);
32 
40  bool lhs_var_occurs_on_rhs() const;
41 
46 
50  std::vector<idx> idxs_;
51 
57  };
58  }
59 }
60 #endif
61 
AST node for assignment to variable with multi-indexing.
Definition: assgn.hpp:15
Probability, optimization and sampling library.
bool lhs_var_occurs_on_rhs() const
Return true if the variable being assigned is a subexpression of the value expression.
Definition: assgn_def.hpp:16
std::vector< idx > idxs_
Position(s) in variable being assigned.
Definition: assgn.hpp:50
expression rhs_
Value being assigned to left hand side variable at indexing position.
Definition: assgn.hpp:56
variable lhs_var_
The variable being assigned.
Definition: assgn.hpp:45
Structure to hold a variable.
Definition: variable.hpp:14
assgn()
Construct an uninitialized assignment statement.
Definition: assgn_def.hpp:10

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