Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ select() [7/7]

template<typename T_bool , typename T_true , typename T_false , require_eigen_array_t< T_bool > * = nullptr, require_any_eigen_array_t< T_true, T_false > * = nullptr>
auto stan::math::select ( T_bool &&  c,
T_true &&  y_true,
T_false &&  y_false 
)
inline

If first argument is true return the second argument, else return the third argument.

Overload for use with an Eigen array of booleans, one Eigen array and a scalar as input.

Template Parameters
T_booltype of Eigen boolean object
T_trueA stan Scalar type or Eigen Array type
T_falseA stan Scalar type or Eigen Array type
Parameters
cEigen object of boolean condition values.
y_trueValue to return if condition is true.
y_falseValue to return if condition is false.

Definition at line 170 of file select.hpp.