Stan  2.14.0
probability, sampling & optimization
is_multi_index_def.hpp
Go to the documentation of this file.
1 #ifndef STAN_LANG_AST_FUN_IS_MULTI_INDEX_DEF_HPP
2 #define STAN_LANG_AST_FUN_IS_MULTI_INDEX_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_multi_index(const idx& idx) {
12  return boost::apply_visitor(v, idx.idx_);
13  }
14 
15  }
16 }
17 #endif
Probability, optimization and sampling library.
bool is_multi_index(const idx &idx)
Return true if the specified index potentially takes more than one value.
Visitor for callback to determine if an index is a multiple index or a single index.
AST variant structure for indexes, holding any of a unary, multi, omni, lower-bound, upper-bound, or lower- and upper-bound index.
Definition: idx.hpp:20
idx_t idx_
The index variant object.
Definition: idx.hpp:82

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