17#include <boost/program_options.hpp>
18#include <boost/spirit/home/support/detail/hold_any.hpp>
19#include <boost/algorithm/string.hpp>
20#include <unordered_map>
21#include <MedMat/MedMat/MedMatConstants.h>
22#include "MedRunPath.h"
23#include "MedSamplingHelper.h"
34template <
class S>
int discretize(vector<S>& x, vector<int>& binned_x,
int& nbins,
int max_bins);
35template <
class S>
int discretize(vector<S>& x, vector<int>& binned_x,
int& nbins,
int max_bins,
float missing_value);
36template <
class S>
int discretize(vector<S>& x, vector<int>& binned_x,
int& nbins,
int max_bins, MedBinningType binning);
37template <
class S>
int discretize(vector<S>& x, vector<int>& binned_x,
int& nbins,
int max_bins,
float missing_value, MedBinningType binning);
39namespace po = boost::program_options;
50 template<
class T>
string print_obj(T obj,
const string &format);
52 template<
class T>
void print_vec(
const vector<T> &vec,
const string &title,
const string &format,
const string &delimeter =
", ");
54 void print_vec(
const vector<string> &vec,
const string &title,
const string &delimeter =
", ");
56 template<
class T>
void print_hist_vec(
const vector<T> &vec,
const string &title,
const string &format,
const vector<double> *prctile_samples = NULL);
60 void log_with_file(ofstream &fw,
const char *format_str, ...);
67 template<
class T>
void prctils(
const vector<T> &x,
const vector<double> &prc, vector<T> &res,
const vector<float> *weights = NULL);
71 template<
typename T>
int binary_search_position(
const T *begin,
const T *end, T val,
bool reversed =
false);
86 template<
typename T>
void get_sort_indexes(
const vector<T> &x,
const bool descending_order,
bool const abs_val, vector<int> &indexes);
96 template<
class T>
string get_list(
const unordered_map<string, T> &ls,
const string &delimeter =
",") {
98 for (
auto it = ls.begin(); it != ls.end(); ++it)
102 res += delimeter + it->first;
105 template<
class T>
string get_list_op(
const unordered_map<T, string> &ls,
const string &delimeter =
",") {
107 for (
auto it = ls.begin(); it != ls.end(); ++it)
108 if (it == ls.begin())
111 res += delimeter + it->second;
114 template<
class ContainerType>
string get_list(
const ContainerType &ls,
const string &delimeter =
",");
127 po::options_description desc;
131 virtual void post_process() {};
133 string get_section(
const string &full_help,
const string &search);
136 void list_sections(
const string &full_help, vector<string> &all_sec);
139 void init(po::options_description &prg_options,
const string &app_l =
"");
144 po::variables_map vm;
146## ## ######## ######## #### ### ## \n\
147### ### ## ## ## ## ## ## ## \n\
148#### #### ## ## ## ## ## ## ## \n\
149## ### ## ###### ## ## ## ## ## ## \n\
150## ## ## ## ## ## ######### ## \n\
151## ## ## ## ## ## ## ## ## \n\
152## ## ######## ######## #### ## ## ######## ";
166#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