17#if !defined(MES_LIBRARY)
18#include <boost/program_options.hpp>
20#include <boost/spirit/home/support/detail/hold_any.hpp>
21#include <boost/algorithm/string.hpp>
22#include <unordered_map>
23#include <MedMat/MedMat/MedMatConstants.h>
24#include "MedRunPath.h"
25#include "MedSamplingHelper.h"
36template <
class S>
int discretize(vector<S>& x, vector<int>& binned_x,
int& nbins,
int max_bins);
37template <
class S>
int discretize(vector<S>& x, vector<int>& binned_x,
int& nbins,
int max_bins,
float missing_value);
38template <
class S>
int discretize(vector<S>& x, vector<int>& binned_x,
int& nbins,
int max_bins, MedBinningType binning);
39template <
class S>
int discretize(vector<S>& x, vector<int>& binned_x,
int& nbins,
int max_bins,
float missing_value, MedBinningType binning);
41#if !defined(MES_LIBRARY)
42namespace po = boost::program_options;
54 template<
class T>
string print_obj(T obj,
const string &format);
56 template<
class T>
void print_vec(
const vector<T> &vec,
const string &title,
const string &format,
const string &delimeter =
", ");
58 void print_vec(
const vector<string> &vec,
const string &title,
const string &delimeter =
", ");
60 template<
class T>
void print_hist_vec(
const vector<T> &vec,
const string &title,
const string &format,
const vector<double> *prctile_samples = NULL);
61 #if !defined(MES_LIBRARY)
66 void log_with_file(ofstream &fw,
const char *format_str, ...);
73 template<
class T>
void prctils(
const vector<T> &x,
const vector<double> &prc, vector<T> &res,
const vector<float> *weights = NULL);
77 template<
typename T>
int binary_search_position(
const T *begin,
const T *end, T val,
bool reversed =
false);
92 template<
typename T>
void get_sort_indexes(
const vector<T> &x,
const bool descending_order,
bool const abs_val, vector<int> &indexes);
102 template<
class T>
string get_list(
const unordered_map<string, T> &ls,
const string &delimeter =
",") {
104 for (
auto it = ls.begin(); it != ls.end(); ++it)
105 if (it == ls.begin())
108 res += delimeter + it->first;
111 template<
class T>
string get_list_op(
const unordered_map<T, string> &ls,
const string &delimeter =
",") {
113 for (
auto it = ls.begin(); it != ls.end(); ++it)
114 if (it == ls.begin())
117 res += delimeter + it->second;
120 template<
class ContainerType>
string get_list(
const ContainerType &ls,
const string &delimeter =
",");
122 #if !defined(MES_LIBRARY)
135 po::options_description desc;
139 virtual void post_process() {};
141 string get_section(
const string &full_help,
const string &search);
144 void list_sections(
const string &full_help, vector<string> &all_sec);
147 void init(po::options_description &prg_options,
const string &app_l =
"");
152 po::variables_map vm;
154## ## ######## ######## #### ### ## \n\
155### ### ## ## ## ## ## ## ## \n\
156#### #### ## ## ## ## ## ## ## \n\
157## ### ## ###### ## ## ## ## ## ## \n\
158## ## ## ## ## ## ######### ## \n\
159## ## ## ## ## ## ## ## ## \n\
160## ## ######## ######## #### ## ## ######## ";
176#include "MedUtils_imp.h"
Logger.h - allowing logs with more control.
A Library to plot graphs in HTML using plotly.js Example Code: vector<map<float,...
process(fname, allow_type)
Definition lint.py:152