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

◆ validate_positive_index()

void stan::math::validate_positive_index ( const char *  var_name,
const char *  expr,
int  val 
)
inline

Check that size is at least 1.

Used for simplexes and other constraints that do a (size - 1) operation.

Parameters
var_nameName of variable
exprExpression in which variable is declared
valSize to check
Exceptions
std::invalid_argumentif size is less than 1

Definition at line 21 of file validate_positive_index.hpp.