Brush C++ API
A flexible interpretable machine learning framework
Loading...
Searching...
No Matches
init.h
Go to the documentation of this file.
1/* Brush
2copyright 2017 William La Cava
3license: GNU/GPL v3
4*/
5
6#ifndef INIT_H
7#define INIT_H
8
9#ifdef _OPENMP
10 #include <omp.h>
11#else
12 #define omp_get_thread_num() 0
13 #define omp_get_num_threads() 1
14 #define omp_get_max_threads() 1
15 #define omp_set_num_threads( x ) 0
16#endif
17// stuff being used
18#include "stdint.h"
19#include <Eigen/Dense>
20#include <memory>
21#include <iostream>
22#include <fstream>
23#include <numeric>
24#include <map>
25#include <set>
26#include <vector>
27#include <string>
28/* #include <fmt/core.h> */
29#define FMT_HEADER_ONLY
30#include <fmt/ostream.h>
31#include <fmt/format.h>
32#include <fmt/ranges.h>
33
34using Eigen::MatrixXf;
35using Eigen::ArrayXXf;
36using Eigen::ArrayXXi;
37using Eigen::VectorXf;
38using Eigen::VectorXi;
39using Eigen::ArrayXf;
40using Eigen::seq;
41// STD
42using std::map;
43using std::vector;
44using std::set;
45using std::string;
46using std::unique_ptr;
47using std::shared_ptr;
48using std::make_shared;
49using std::cout;
50typedef std::map<string,
51 std::pair<vector<ArrayXf>, vector<ArrayXf>>
53using Eigen::Dynamic;
54using Eigen::Map;
55// internal includes
56// #include "../thirdparty/json.hpp"
57#include "nlohmann/json.hpp"
58using nlohmann::json;
59
60static float NEAR_ZERO = 0.0000001;
61static float MAX_FLT = std::numeric_limits<float>::max();
62static float MIN_FLT = std::numeric_limits<float>::lowest();
63
64#include "types.h"
65namespace Brush{
66// helper constant for the visitor
67template<class> inline constexpr bool always_false_v = false;
68// explicit deduction guide (not needed as of C++20)
69/* template<class... Ts> struct overloaded : Ts... { using Ts::operator()...; }; */
70/* template<class... Ts> overloaded(Ts...) -> overloaded<Ts...>; */
71}
72
73#endif
static float MAX_FLT
Definition init.h:61
static float MIN_FLT
Definition init.h:62
static float NEAR_ZERO
Definition init.h:60
std::map< string, std::pair< vector< ArrayXf >, vector< ArrayXf > > > LongData
Definition init.h:52
< nsga2 selection operator for getting the front
Definition data.cpp:12
constexpr bool always_false_v
Definition init.h:67