Stan  2.14.0
probability, sampling & optimization
name_vis_def.hpp
Go to the documentation of this file.
1 #ifndef STAN_LANG_AST_FUN_NAME_VIS_DEF_HPP
2 #define STAN_LANG_AST_FUN_NAME_VIS_DEF_HPP
3 
4 #include <stan/lang/ast.hpp>
5 #include <string>
6 
7 namespace stan {
8  namespace lang {
9 
11 
12  std::string name_vis::operator()(const nil& /* x */) const {
13  return "";
14  }
15 
16  std::string name_vis::operator()(const int_var_decl& x) const {
17  return x.name_;
18  }
19 
20  std::string name_vis::operator()(const double_var_decl& x) const {
21  return x.name_;
22  }
23 
24  std::string name_vis::operator()(const vector_var_decl& x) const {
25  return x.name_;
26  }
27 
28  std::string name_vis::operator()(const row_vector_var_decl& x) const {
29  return x.name_;
30  }
31 
32  std::string name_vis::operator()(const matrix_var_decl& x) const {
33  return x.name_;
34  }
35 
36  std::string name_vis::operator()(const unit_vector_var_decl& x) const {
37  return x.name_;
38  }
39 
40  std::string name_vis::operator()(const simplex_var_decl& x) const {
41  return x.name_;
42  }
43 
44  std::string name_vis::operator()(const ordered_var_decl& x) const {
45  return x.name_;
46  }
47 
48  std::string name_vis::operator()(const positive_ordered_var_decl& x) const {
49  return x.name_;
50  }
51 
52  std::string name_vis::operator()(const cholesky_factor_var_decl& x) const {
53  return x.name_;
54  }
55 
56  std::string name_vis::operator()(const cholesky_corr_var_decl& x) const {
57  return x.name_;
58  }
59 
60  std::string name_vis::operator()(const cov_matrix_var_decl& x) const {
61  return x.name_;
62  }
63 
64  std::string name_vis::operator()(const corr_matrix_var_decl& x) const {
65  return x.name_;
66  }
67 
68  }
69 }
70 #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.
Probability, optimization and sampling library.
Structure to hold a covariance matrix variable declaration.
Structure to hold the declaration of a simplex.
Structure to hold a Cholesky factor for a correlation matrix variable declaration.
Structure to hold the declaration of a unit vector.
std::string name_
Name of the variable.
Structure to hold a matrix variable declaration.
Structure to hold a Cholesky factor variable declaration.
Structure to hold a column vector variable declaration.
std::string operator()(const nil &x) const
Return the empty string.
Structure to hold a correlation matrix variable declaration.
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
name_vis()
Construct a name visitor.

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