Stan
2.14.0
probability, sampling & optimization
src
stan
lang
ast
node
index_op_sliced_def.hpp
Go to the documentation of this file.
1
#ifndef STAN_LANG_AST_NODE_INDEX_OP_SLICED_DEF_HPP
2
#define STAN_LANG_AST_NODE_INDEX_OP_SLICED_DEF_HPP
3
4
#include <
stan/lang/ast.hpp
>
5
#include <vector>
6
7
namespace
stan
{
8
namespace
lang {
9
10
index_op_sliced::index_op_sliced
() { }
11
12
index_op_sliced::index_op_sliced
(
const
expression
& expr,
13
const
std::vector<idx>& idxs)
14
:
expr_
(expr),
idxs_
(idxs),
type_
(
indexed_type
(
expr_
,
idxs_
)) { }
15
16
void
index_op_sliced::infer_type
() {
17
type_
=
indexed_type
(
expr_
,
idxs_
);
18
}
19
20
}
21
}
22
#endif
stan
Probability, optimization and sampling library.
Definition:
base_interrupt.hpp:4
stan::lang::expression
Definition:
expression.hpp:41
stan::lang::index_op_sliced::index_op_sliced
index_op_sliced()
Construct a default indexed expression (all nil).
Definition:
index_op_sliced_def.hpp:10
stan::lang::indexed_type
expr_type indexed_type(const expression &e, const std::vector< idx > &idxs)
Return the type of the expression indexed by the generalized index sequence.
Definition:
indexed_type_def.hpp:10
stan::lang::index_op_sliced::type_
expr_type type_
Type of result.
Definition:
index_op_sliced.hpp:30
stan::lang::index_op_sliced::idxs_
std::vector< idx > idxs_
Sequence of indexes.
Definition:
index_op_sliced.hpp:25
ast.hpp
stan::lang::index_op_sliced::infer_type
void infer_type()
Infer the type of the result.
Definition:
index_op_sliced_def.hpp:16
stan::lang::index_op_sliced::expr_
expression expr_
Expression being indexed.
Definition:
index_op_sliced.hpp:20
[
Stan Home Page
]
© 2011–2016, Stan Development Team.