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

Structure for the conditional operator. More...

#include <conditional_op.hpp>

Public Member Functions

 conditional_op ()
 Construct a default conditional operator expression. More...
 
 conditional_op (const expression &cond, const expression &true_val, const expression &false_val)
 Construct a conditional operator expression from the specified condition and values. More...
 

Public Attributes

expression cond_
 Condition (integer). More...
 
expression true_val_
 Return value if condition is true. More...
 
expression false_val_
 Return value if condition is false. More...
 
expr_type type_
 Type of result. More...
 
bool has_var_
 True if the conditional operator contains a variable that is declared as a parameter, transformed parameter, or local variable. More...
 
var_origin var_origin_
 Origin of this conditional operator expression. More...
 

Detailed Description

Structure for the conditional operator.

Definition at line 14 of file conditional_op.hpp.

Constructor & Destructor Documentation

§ conditional_op() [1/2]

stan::lang::conditional_op::conditional_op ( )

Construct a default conditional operator expression.

Definition at line 9 of file conditional_op_def.hpp.

§ conditional_op() [2/2]

stan::lang::conditional_op::conditional_op ( const expression cond,
const expression true_val,
const expression false_val 
)

Construct a conditional operator expression from the specified condition and values.

Parameters
condcondition expression
true_valvalue to return if true
false_valvalue to return if false

Definition at line 11 of file conditional_op_def.hpp.

Member Data Documentation

§ cond_

expression stan::lang::conditional_op::cond_

Condition (integer).

Definition at line 18 of file conditional_op.hpp.

§ false_val_

expression stan::lang::conditional_op::false_val_

Return value if condition is false.

Definition at line 28 of file conditional_op.hpp.

§ has_var_

bool stan::lang::conditional_op::has_var_

True if the conditional operator contains a variable that is declared as a parameter, transformed parameter, or local variable.

Definition at line 40 of file conditional_op.hpp.

§ true_val_

expression stan::lang::conditional_op::true_val_

Return value if condition is true.

Definition at line 23 of file conditional_op.hpp.

§ type_

expr_type stan::lang::conditional_op::type_

Type of result.

Definition at line 33 of file conditional_op.hpp.

§ var_origin_

var_origin stan::lang::conditional_op::var_origin_

Origin of this conditional operator expression.

Definition at line 45 of file conditional_op.hpp.


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

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