mlpack
Macros | Functions
test_catch_tools.hpp File Reference
#include <mlpack/core.hpp>
#include "catch.hpp"
Include dependency graph for test_catch_tools.hpp:

Go to the source code of this file.

Macros

#define REQUIRE_RELATIVE_ERR(L, R, E)   REQUIRE(std::abs((R) - (L)) <= (E) * std::abs(R))
 

Functions

void CheckMatrices (const arma::mat &a, const arma::mat &b, double tolerance=1e-5)
 
void CheckMatrices (const arma::Mat< size_t > &a, const arma::Mat< size_t > &b)
 
template<typename FieldType , typename = std::enable_if_t< arma::is_arma_type<typename FieldType::object_type>::value>>
void CheckFields (const FieldType &a, const FieldType &b)
 
void CheckMatrices (const arma::cube &a, const arma::cube &b, double tolerance=1e-5)
 
void CheckMatricesNotEqual (const arma::mat &a, const arma::mat &b, double tolerance=1e-5)
 
void CheckMatricesNotEqual (const arma::Mat< size_t > &a, const arma::Mat< size_t > &b)
 
void CheckMatricesNotEqual (const arma::cube &a, const arma::cube &b, double tolerance=1e-5)
 
std::string FilterFileName (const std::string &inputString)
 

Detailed Description

Author
Ryan Curtin

This file includes some useful macros for tests.

mlpack is free software; you may redistribute it and/or modify it under the terms of the 3-clause BSD license. You should have received a copy of the 3-clause BSD license along with mlpack. If not, see http://www.opensource.org/licenses/BSD-3-Clause for more information.