![]() |
Stan
2.14.0
probability, sampling & optimization
|
AST node for conditional statements. More...
#include <conditional_statement.hpp>
Public Member Functions | |
conditional_statement () | |
Construct an empty conditional statement. More... | |
conditional_statement (const std::vector< expression > &conditions, const std::vector< statement > &statements) | |
Construct a conditional statement with the parallel sequences of conditions and statements. More... | |
Public Attributes | |
std::vector< expression > | conditions_ |
The sequence of conditions (parallel with bodies). More... | |
std::vector< statement > | bodies_ |
The sequence of bodies to execute. More... | |
AST node for conditional statements.
Definition at line 14 of file conditional_statement.hpp.
stan::lang::conditional_statement::conditional_statement | ( | ) |
Construct an empty conditional statement.
Definition at line 10 of file conditional_statement_def.hpp.
stan::lang::conditional_statement::conditional_statement | ( | const std::vector< expression > & | conditions, |
const std::vector< statement > & | statements | ||
) |
Construct a conditional statement with the parallel sequences of conditions and statements.
If there is a default case at the end of the conditional statement without a condition, the statement sequence will be one element longer than the condition sequence.
[in] | conditions | conditions for conditional |
[in] | statements | bodies of conditionals |
Definition at line 13 of file conditional_statement_def.hpp.
std::vector<statement> stan::lang::conditional_statement::bodies_ |
The sequence of bodies to execute.
This is the same size or one longer than conditions_
.
Definition at line 41 of file conditional_statement.hpp.
std::vector<expression> stan::lang::conditional_statement::conditions_ |
The sequence of conditions (parallel with bodies).
Definition at line 35 of file conditional_statement.hpp.