8#ifndef LIBQE_VALIDATE_HPP
9#define LIBQE_VALIDATE_HPP
27 throw std::invalid_argument(
28 std::string(param) +
" contains NaN or Inf — "
29 "filter or impute rows with non-finite values before calling");
43 if (rows < 0 || cols < 0 ||
44 static_cast<std::size_t
>(rows) *
static_cast<std::size_t
>(cols) != n)
45 throw std::invalid_argument(
"matrix dimensions do not match the data length");
Definition adjacency.hpp:16
void require_dims(std::size_t n, int rows, int cols)
Throw unless rows × cols describes exactly n elements.
Definition validate.hpp:42
void require_finite(const arma::mat &m, const char *param)
Throw if m contains NaN or Inf.
Definition validate.hpp:25