Stan  1.3
probability, sampling & optimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Pages
Namespaces | Functions
if_else.hpp File Reference
#include <stan/agrad/rev/var.hpp>

Go to the source code of this file.

Namespaces

namespace  stan
 Probability, optimization and sampling library.
 
namespace  stan::agrad
 Function gradients via reverse-mode automatic differentiation.
 

Functions

var stan::agrad::if_else (bool c, const var &y_true, const var &y_false)
 If the specified condition is true, return the first variable, otherwise return the second variable.
 
var stan::agrad::if_else (bool c, double y_true, const var &y_false)
 If the specified condition is true, return a new variable constructed from the first scalar, otherwise return the second variable.
 
var stan::agrad::if_else (bool c, const var &y_true, const double y_false)
 If the specified condition is true, return the first variable, otherwise return a new variable constructed from the second scalar.
 

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