Stan  2.14.0
probability, sampling & optimization
Public Member Functions | Public Attributes | List of all members
stan::lang::conditional_statement Struct Reference

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< expressionconditions_
 The sequence of conditions (parallel with bodies). More...
 
std::vector< statementbodies_
 The sequence of bodies to execute. More...
 

Detailed Description

AST node for conditional statements.

Definition at line 14 of file conditional_statement.hpp.

Constructor & Destructor Documentation

§ conditional_statement() [1/2]

stan::lang::conditional_statement::conditional_statement ( )

Construct an empty conditional statement.

Definition at line 10 of file conditional_statement_def.hpp.

§ conditional_statement() [2/2]

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.

Parameters
[in]conditionsconditions for conditional
[in]statementsbodies of conditionals

Definition at line 13 of file conditional_statement_def.hpp.

Member Data Documentation

§ bodies_

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.

§ conditions_

std::vector<expression> stan::lang::conditional_statement::conditions_

The sequence of conditions (parallel with bodies).

Definition at line 35 of file conditional_statement.hpp.


The documentation for this struct was generated from the following files:

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