Stan  2.14.0
probability, sampling & optimization
var_decl.hpp
Go to the documentation of this file.
1 #ifndef STAN_LANG_ASST_NODE_VAR_DECL_HPP
2 #define STAN_LANG_ASST_NODE_VAR_DECL_HPP
3 
20 #include <boost/variant/recursive_variant.hpp>
21 #include <string>
22 #include <vector>
23 
24 namespace stan {
25  namespace lang {
26 
30  struct var_decl {
34  typedef boost::variant<boost::recursive_wrapper<nil>,
35  boost::recursive_wrapper<int_var_decl>,
36  boost::recursive_wrapper<double_var_decl>,
37  boost::recursive_wrapper<vector_var_decl>,
38  boost::recursive_wrapper<row_vector_var_decl>,
39  boost::recursive_wrapper<matrix_var_decl>,
40  boost::recursive_wrapper<simplex_var_decl>,
41  boost::recursive_wrapper<unit_vector_var_decl>,
42  boost::recursive_wrapper<ordered_var_decl>,
43  boost::recursive_wrapper<positive_ordered_var_decl>,
44  boost::recursive_wrapper<cholesky_factor_var_decl>,
45  boost::recursive_wrapper<cholesky_corr_var_decl>,
46  boost::recursive_wrapper<cov_matrix_var_decl>,
47  boost::recursive_wrapper<corr_matrix_var_decl> >
49 
53  var_decl();
54 
62  var_decl(const var_decl_t& decl); // NOLINT(runtime/explicit)
63 
70  var_decl(const nil& decl); // NOLINT(runtime/explicit)
71 
78  var_decl(const int_var_decl& decl); // NOLINT(runtime/explicit)
79 
86  var_decl(const double_var_decl& decl); // NOLINT(runtime/explicit)
87 
94  var_decl(const vector_var_decl& decl); // NOLINT(runtime/explicit)
95 
102  var_decl(const row_vector_var_decl& decl); // NOLINT(runtime/explicit)
103 
110  var_decl(const matrix_var_decl& decl); // NOLINT(runtime/explicit)
111 
118  var_decl(const simplex_var_decl& decl); // NOLINT(runtime/explicit)
119 
126  var_decl(const unit_vector_var_decl& decl); // NOLINT(runtime/explicit)
127 
134  var_decl(const ordered_var_decl& decl); // NOLINT(runtime/explicit)
135 
142  var_decl(const positive_ordered_var_decl& decl); // NOLINT
143 
150  var_decl(const cholesky_factor_var_decl& decl); // NOLINT
151 
158  var_decl(const cholesky_corr_var_decl& decl); // NOLINT(runtime/explicit)
159 
166  var_decl(const cov_matrix_var_decl& decl); // NOLINT(runtime/explicit)
167 
174  var_decl(const corr_matrix_var_decl& decl); // NOLINT(runtime/explicit)
175 
181  std::string name() const;
182 
188  base_var_decl base_decl() const;
189 
195  std::vector<expression> dims() const;
196 
202  bool has_def() const;
203 
209  expression def() const;
210 
215  };
216 
217  }
218 }
219 #endif
An integer variable declaration and optional definition.
Structure to hold the declaration of a positive ordered vector.
Structure to hold a row vector variable declaration.
bool has_def() const
Return true if this declaration also contains a definition.
Probability, optimization and sampling library.
Structure to hold a covariance matrix variable declaration.
var_decl()
Construct a default variable declaration.
Structure to hold the declaration of a simplex.
Structure to hold a Cholesky factor for a correlation matrix variable declaration.
boost::variant< boost::recursive_wrapper< nil >, boost::recursive_wrapper< int_var_decl >, boost::recursive_wrapper< double_var_decl >, boost::recursive_wrapper< vector_var_decl >, boost::recursive_wrapper< row_vector_var_decl >, boost::recursive_wrapper< matrix_var_decl >, boost::recursive_wrapper< simplex_var_decl >, boost::recursive_wrapper< unit_vector_var_decl >, boost::recursive_wrapper< ordered_var_decl >, boost::recursive_wrapper< positive_ordered_var_decl >, boost::recursive_wrapper< cholesky_factor_var_decl >, boost::recursive_wrapper< cholesky_corr_var_decl >, boost::recursive_wrapper< cov_matrix_var_decl >, boost::recursive_wrapper< corr_matrix_var_decl > > var_decl_t
The variant type for a variable declaration.
Definition: var_decl.hpp:48
var_decl_t decl_
The variable declaration variant type.
Definition: var_decl.hpp:214
base_var_decl base_decl() const
Return the base declaration.
Structure to hold the declaration of a unit vector.
std::string name() const
Return the declaration&#39;s variable name.
Structure to hold a matrix variable declaration.
Structure to hold a Cholesky factor variable declaration.
expression def() const
Return the definition included in this declaration.
Structure to hold a column vector variable declaration.
The variant structure to hold a variable declaration.
Definition: var_decl.hpp:30
Structure to hold a correlation matrix variable declaration.
AST base class for variable declarations, which share most of their structure.
An integer variable declaration and optional definition.
Structure to hold the declaration of an ordered vector.
The nil structure used as a placeholder for undefined or empty values in several structures.
Definition: nil.hpp:11
std::vector< expression > dims() const
Return the sequence of array dimension sizes.

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