1 #ifndef STAN_LANG_AST_FUN_INDEXED_TYPE_DEF_HPP 2 #define STAN_LANG_AST_FUN_INDEXED_TYPE_DEF_HPP 15 size_t unindexed_dims = base_dims;
18 for ( ; unindexed_dims > 0 && i < idxs.size(); ++i, --unindexed_dims)
21 if (idxs.size() - i == 0) {
22 return expr_type(base_type, out_dims + unindexed_dims);
23 }
else if (idxs.size() - i == 1) {
42 }
else if (idxs.size() - i == 2) {
const int ROW_VECTOR_T
Row vector type; scalar type is real.
std::size_t num_dims_
The number of array dimensions.
Probability, optimization and sampling library.
bool is_multi_index(const idx &idx)
Return true if the specified index potentially takes more than one value.
const int DOUBLE_T
Real scalar type.
int base_expr_type
The type of a base expression.
Structure of the type of an expression, which consists of a base type and a number of dimensions...
expr_type expression_type() const
expr_type indexed_type(const expression &e, const std::vector< idx > &idxs)
Return the type of the expression indexed by the generalized index sequence.
base_expr_type base_type_
The base expression type.
const int VECTOR_T
Column vector type; scalar type is real.
const int ILL_FORMED_T
Type denoting an ill-formed expression.
const int MATRIX_T
Matrix type; scalar type is real.