Stan  2.14.0
probability, sampling & optimization
assgn_def.hpp
Go to the documentation of this file.
1 #ifndef STAN_LANG_AST_NODE_ASSGN_DEF_HPP
2 #define STAN_LANG_AST_NODE_ASSGN_DEF_HPP
3 
4 #include <stan/lang/ast.hpp>
5 #include <vector>
6 
7 namespace stan {
8  namespace lang {
9 
11 
12  assgn::assgn(const variable& lhs_var, const std::vector<idx>& idxs,
13  const expression& rhs)
14  : lhs_var_(lhs_var), idxs_(idxs), rhs_(rhs) { }
15 
18  return boost::apply_visitor(vis, rhs_.expr_);
19  }
20 
21  }
22 }
23 #endif
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.