7#ifndef GOOSEEYE_CONFIG_H
8#define GOOSEEYE_CONFIG_H
13#define _USE_MATH_DEFINES
33#include <xtensor/xadapt.hpp>
34#include <xtensor/xarray.hpp>
35#include <xtensor/xio.hpp>
36#include <xtensor/xmath.hpp>
37#include <xtensor/xpad.hpp>
38#include <xtensor/xsort.hpp>
39#include <xtensor/xtensor.hpp>
40#include <xtensor/xview.hpp>
48#define GOOSEEYE_WARNING_IMPL(message, file, line, function) \
49 std::cout << std::string(file) + ":" + std::to_string(line) + " (" + std::string(function) + \
50 ")" + ": " message ") \n\t";
52#define GOOSEEYE_ASSERT_IMPL(expr, assertion, file, line, function) \
55 std::string(file) + ":" + std::to_string(line) + " (" + std::string(function) + ")" + \
56 ": assertion failed (" #expr ") \n\t"); \
59#define SIGN(a) ((a < 0) ? -1 : a > 0 ? 1 : 0)
67#define GOOSEEYE_REQUIRE(expr, assertion) \
68 GOOSEEYE_ASSERT_IMPL(expr, assertion, __FILE__, __LINE__, __FUNCTION__)
87#ifdef GOOSEEYE_ENABLE_ASSERT
88#define GOOSEEYE_ASSERT(expr, assertion) \
89 GOOSEEYE_ASSERT_IMPL(expr, assertion, __FILE__, __LINE__, __FUNCTION__)
91#define GOOSEEYE_ASSERT(expr, assertion)
103#ifndef GOOSEEYE_DISABLE_WARNING
104#define GOOSEEYE_WARNING(message) GOOSEEYE_WARNING_IMPL(message, __FILE__, __LINE__, __FUNCTION__)
106#define GOOSEEYE_WARNING(message)
118#ifdef GOOSEEYE_ENABLE_WARNING_PYTHON
119#define GOOSEEYE_WARNING_PYTHON(message) \
120 GOOSEEYE_WARNING_IMPL(message, __FILE__, __LINE__, __FUNCTION__)
122#define GOOSEEYE_WARNING_PYTHON(message)
133namespace array_type {
135#ifdef GOOSEEYE_USE_XTENSOR_PYTHON
140template <
typename T,
size_t N>
141using tensor = xt::pytensor<T, N>;
147using array = xt::pyarray<T>;
154template <
typename T,
size_t N>
xt::xtensor< T, N > tensor
Fixed (static) rank array.
xt::xarray< T > array
Dynamic rank array.
Toolbox to compute statistics.