Stan  2.14.0
probability, sampling & optimization
index_op_def.hpp
Go to the documentation of this file.
1 #ifndef STAN_LANG_AST_NODE_INDEX_OP_DEF_HPP
2 #define STAN_LANG_AST_NODE_INDEX_OP_DEF_HPP
3 
4 #include <stan/lang/ast.hpp>
5 #include <vector>
6 
7 namespace stan {
8  namespace lang {
9 
11 
13  const std::vector<std::vector<expression> >& dimss)
14  : expr_(expr), dimss_(dimss) {
15  infer_type();
16  }
17 
20  }
21 
22  }
23 }
24 #endif
expr_type type_
Type of indexed expression.
Definition: index_op.hpp:28
Probability, optimization and sampling library.
std::size_t total_dims(const std::vector< std::vector< expression > > &dimss)
Return the total number of dimensions when the specified vectors of expressions are concatenated...
expr_type infer_type_indexing(const base_expr_type &base_type, std::size_t dims, std::size_t num_indexes)
Return the expression type resulting from indexing an expression of the specified base type and numbe...
expression expr_
Expression being indexed.
Definition: index_op.hpp:18
index_op()
Construct a default indexed expression.
std::vector< std::vector< expression > > dimss_
Sequence of sequences of indexes.
Definition: index_op.hpp:23

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