Defines a set of checker functors for micro-tests within ViennaSHE. More...
#include <iostream>
#include <limits>
#include <vector>
#include <cmath>
#include "viennashe/util/exception.hpp"
#include "viennashe/math/linalg_util.hpp"
#include "viennashe/log/log.hpp"
#include "viennashe/util/log_keys.h"
Go to the source code of this file.
Classes | |
struct | viennashe::util::all_ok_checker |
A checker that never complains. Can be used instead of overly picky/erroneous checkers (just for debugging purposes, of course!) More... | |
class | viennashe::util::range_checker< ValueType > |
Checker for values inside a half-open interval [a, b), where 'a' is included, while 'b' is not. More... | |
struct | viennashe::util::nan_checker |
Checks for NaN. More... | |
struct | viennashe::util::inf_checker |
Checks for Inf. More... | |
class | viennashe::util::checker_with_exception< BasicChecker, ExceptionType > |
A checker class that throws a user-provided exception rather than returning false on its functor interface. More... | |
Namespaces | |
namespace | viennashe |
The main ViennaSHE namespace. All functionality resides inside this namespace. | |
namespace | viennashe::util |
A collection of utilities used within ViennaSHE. | |
Functions | |
template<typename ValueType > | |
bool | viennashe::util::is_NaN (const ValueType &val) |
Checks if a value of type ValueType is NaN using value != value. More... | |
template<typename ValueType > | |
bool | viennashe::util::is_Inf (const ValueType &val) |
Checks if a value of type ValueType is Inf using (value - value) != 0. More... | |
template<typename ValueType > | |
bool | viennashe::util::is_negative (const ValueType &val) |
Checks if a value of type ValueType is negative using value < 0. More... | |
template<typename VectorType > | |
void | viennashe::util::check_vector_for_valid_entries (VectorType const &vec, std::string message="Location not specified") |
Checks a vector for valid entries (i.e. no NaN). More... | |
template<typename CheckerType , typename ExceptionType > | |
checker_with_exception< CheckerType, ExceptionType > | viennashe::util::make_checker_with_exception (CheckerType const &checker, ExceptionType const &ex) |
Convenience creator routine for creating a checker with exception from checker returning a bool only. More... | |
template<typename MatrixType > | |
void | viennashe::util::m_matrix_check (MatrixType const &A) |
Checks a matrix for being an M matrix. More... | |
template<typename MatrixType > | |
long | viennashe::util::matrix_consistency_check (MatrixType const &matrix) |
Checks a matrix for empty rows. More... | |
template<typename NumericT > | |
long | viennashe::util::matrix_consistency_check (viennashe::math::sparse_matrix< NumericT > const &matrix) |
Checks a matrix for empty rows. More... | |
template<typename MatrixType > | |
void | viennashe::util::check_vanishing_column_sums (MatrixType const &matrix, std::size_t num_cols) |
Checks that the first 'num_cols' column sums of the provided matrix vanish (up to round-off) or a column is not populated with any entries at all. More... | |
Defines a set of checker functors for micro-tests within ViennaSHE.
Definition in file checks.hpp.