libqe 0.2.5
QE C++ library
Loading...
Searching...
No Matches
validate.hpp File Reference

Input checks shared by the language bindings. More...

#include <armadillo>
#include <cstddef>
#include <stdexcept>
#include <string>

Go to the source code of this file.

Namespaces

namespace  qe
 

Functions

void qe::require_finite (const arma::mat &m, const char *param)
 Throw if m contains NaN or Inf.
 
void qe::require_dims (std::size_t n, int rows, int cols)
 Throw unless rows × cols describes exactly n elements.
 

Detailed Description

Input checks shared by the language bindings.

No third-party dependencies beyond Armadillo, so every binding (and any other C++ consumer) can use the same checks and error messages.