Stan  2.14.0
probability, sampling & optimization
sample_def.hpp
Go to the documentation of this file.
1 #ifndef STAN_LANG_AST_NODE_SAMPLE_DEF_HPP
2 #define STAN_LANG_AST_NODE_SAMPLE_DEF_HPP
3 
4 #include <stan/lang/ast.hpp>
5 
6 namespace stan {
7  namespace lang {
8 
9 
11 
13  : expr_(e), dist_(dist) { }
14 
15  bool sample::is_ill_formed() const {
17  || (truncation_.has_low()
19  || (truncation_.has_high()
22  }
23 
24  bool sample::is_discrete() const {
25  return is_discrete_;
26  }
27 
28  }
29 }
30 #endif
expression high_
Upper bound of range with nil value if only upper bound.
Definition: range.hpp:25
bool is_ill_formed() const
Return true if the base type of this type is ill formed.
distribution dist_
Distribution of the variable.
Definition: sample.hpp:54
range truncation_
The truncation range for the distribution.
Definition: sample.hpp:59
bool has_low() const
Return true if the lower bound is non-nil.
Definition: range_def.hpp:14
Probability, optimization and sampling library.
bool is_ill_formed() const
Return true if the sampling statement is not well formed.
Definition: sample_def.hpp:15
bool has_high() const
Return true if the upper bound is non-nil.
Definition: range_def.hpp:18
expr_type expression_type() const
Structure for a distribution with parameters.
bool is_discrete() const
Return true if the distribution is discrete.
Definition: sample_def.hpp:24
expression expr_
The random variable.
Definition: sample.hpp:49
expression low_
Lower bound of range with nil value if only upper bound.
Definition: range.hpp:19
sample()
Construct an uninitialized sampling statement.
Definition: sample_def.hpp:10
bool is_discrete_
Discreteness flag.
Definition: sample.hpp:64

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