Stan  2.14.0
probability, sampling & optimization
range_def.hpp
Go to the documentation of this file.
1 #ifndef STAN_LANG_AST_NODE_RANGE_DEF_HPP
2 #define STAN_LANG_AST_NODE_RANGE_DEF_HPP
3 
4 #include <stan/lang/ast.hpp>
5 
6 namespace stan {
7  namespace lang {
8 
10 
11  range::range(const expression& low, const expression& high)
12  : low_(low), high_(high) { }
13 
14  bool range::has_low() const {
15  return !is_nil(low_.expr_);
16  }
17 
18  bool range::has_high() const {
19  return !is_nil(high_.expr_);
20  }
21 
22  }
23 }
24 #endif
expression high_
Upper bound of range with nil value if only upper bound.
Definition: range.hpp:25
bool has_low() const
Return true if the lower bound is non-nil.
Definition: range_def.hpp:14
Probability, optimization and sampling library.
bool has_high() const
Return true if the upper bound is non-nil.
Definition: range_def.hpp:18
bool is_nil(const expression &e)
Return true if the specified expression is nil.
Definition: is_nil_def.hpp:10
expression low_
Lower bound of range with nil value if only upper bound.
Definition: range.hpp:19
range()
Construct a default range object.
Definition: range_def.hpp:9

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