Stan Math Library
5.0.0
Automatic Differentiation
|
void stan::math::check_unit_vector | ( | const char * | function, |
const char * | name, | ||
const StdVec & | theta | ||
) |
Throw an exception if the each element in a standard vector does not have unit Euclidiean length.
StdVec | A standard vector with inner type inheriting from Eigen::EigenBase |
function | Function name (for error messages) |
name | Variable name (for error messages) |
theta | Vector to test |
`std::invalid_argument` | if theta is a 0-vector |
`std::domain_error` | if the vector is not a unit vector or if any element is NaN |
Definition at line 67 of file check_unit_vector.hpp.