Stan  2.14.0
probability, sampling & optimization
is_nil_def.hpp
Go to the documentation of this file.
1 #ifndef STAN_LANG_AST_FUN_IS_NIL_DEF_HPP
2 #define STAN_LANG_AST_FUN_IS_NIL_DEF_HPP
3 
4 #include <stan/lang/ast.hpp>
5 #include <boost/variant/apply_visitor.hpp>
6 
7 namespace stan {
8  namespace lang {
9 
10  bool is_nil(const expression& e) {
11  is_nil_vis ino;
12  return boost::apply_visitor(ino, e.expr_);
13  }
14 
15  }
16 }
17 #endif
Probability, optimization and sampling library.
bool is_nil(const expression &e)
Return true if the specified expression is nil.
Definition: is_nil_def.hpp:10
Callback functor for determining if one of the variant types making up an expression is nil...
Definition: is_nil_vis.hpp:27

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