Stan  2.14.0
probability, sampling & optimization
variable_def.hpp
Go to the documentation of this file.
1 #ifndef STAN_LANG_AST_NODE_VARIABLE_DEF_HPP
2 #define STAN_LANG_AST_NODE_VARIABLE_DEF_HPP
3 
4 #include <stan/lang/ast.hpp>
5 #include <string>
6 
7 namespace stan {
8  namespace lang {
9 
11 
12  variable::variable(const std::string& name) : name_(name) { }
13 
14  void variable::set_type(const base_expr_type& base_type, size_t num_dims) {
15  type_ = expr_type(base_type, num_dims);
16  }
17 
18  }
19 }
20 #endif
std::string name_
Name of variable.
Definition: variable.hpp:18
Probability, optimization and sampling library.
int base_expr_type
The type of a base expression.
Structure of the type of an expression, which consists of a base type and a number of dimensions...
Definition: expr_type.hpp:14
expr_type type_
Type of variable.
Definition: variable.hpp:23
void set_type(const base_expr_type &base_type, std::size_t num_dims)
Set the type of the variable to the expression type with the specified base type and number of dimens...
variable()
Construct a default variable.

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