Brush C++ API
A flexible interpretable machine learning framework
Toggle main menu visibility
Loading...
Searching...
No Matches
init.h
Go to the documentation of this file.
1
/* Brush
2
copyright 2017 William La Cava
3
license: 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
34
using
Eigen::MatrixXf;
35
using
Eigen::Matrix;
36
using
Eigen::Array;
37
using
Eigen::Ref;
38
using
Eigen::BDCSVD;
39
using
Eigen::StrictlyUpper;
40
using
Eigen::ArrayXXf;
41
using
Eigen::ArrayXXi;
42
using
Eigen::VectorXf;
43
using
Eigen::VectorXi;
44
using
Eigen::ArrayXf;
45
using
Eigen::seq;
46
// STD
47
using
std::map;
48
using
std::vector;
49
using
std::set;
50
using
std::string;
51
using
std::unique_ptr;
52
using
std::shared_ptr;
53
using
std::make_shared;
54
using
std::cout;
55
typedef
std::map<string,
56
std::pair<vector<ArrayXf>, vector<ArrayXf>>
57
>
LongData
;
58
using
Eigen::Dynamic;
59
using
Eigen::Map;
60
// internal includes
61
// #include "../thirdparty/json.hpp"
62
#include "nlohmann/json.hpp"
63
using
nlohmann::json;
64
65
static
float
NEAR_ZERO
= 0.0000001;
66
static
float
MAX_FLT
= std::numeric_limits<float>::max();
67
static
float
MIN_FLT
= std::numeric_limits<float>::lowest();
68
69
#include "
types.h
"
70
namespace
Brush
{
71
// helper constant for the visitor
72
template
<
class
>
inline
constexpr
bool
always_false_v
=
false
;
73
// explicit deduction guide (not needed as of C++20)
74
/* template<class... Ts> struct overloaded : Ts... { using Ts::operator()...; }; */
75
/* template<class... Ts> overloaded(Ts...) -> overloaded<Ts...>; */
76
}
77
78
#endif
MAX_FLT
static float MAX_FLT
Definition
init.h:66
MIN_FLT
static float MIN_FLT
Definition
init.h:67
NEAR_ZERO
static float NEAR_ZERO
Definition
init.h:65
LongData
std::map< string, std::pair< vector< ArrayXf >, vector< ArrayXf > > > LongData
Definition
init.h:57
Brush
< nsga2 selection operator for getting the front
Definition
bandit.cpp:3
Brush::always_false_v
constexpr bool always_false_v
Definition
init.h:72
types.h
src
init.h
Generated by
1.17.0