utils.h
1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef HUTILS
#define HUTILS
#include <vector>
#include <utility>
#include <string>
#include <dlib/clustering.h>
static const float PRECISION = 0.00001;
int find_bp(std::vector < std::pair < unsigned int, unsigned int > > listBp, std::pair< unsigned int, unsigned int > p);
std::vector< unsigned int > find_bp_with_i(std::vector < std::pair < unsigned int, unsigned int > > listBp, unsigned int i);
std::vector< int > find_bp_with_i(
std::vector < std::pair < std::pair < uint, uint >, std::pair < uint, uint > > > listBp,
std::pair < uint, uint > i);
bool find_i_at_first(std::vector < std::pair < unsigned int, unsigned int > > v, unsigned int i );
bool find_i_at_second(std::vector < std::pair < unsigned int, unsigned int > > v, unsigned int i );
int find_i_at_first_int(std::vector < std::pair < unsigned int, unsigned int > > v, unsigned int i );
int find_i_at_second_int(std::vector < std::pair < unsigned int, unsigned int > > v, unsigned int i );
bool app(const char c1, const char c2);
bool checkIC(std::string ic);
int dominate(std::vector < float > c1, std::vector < float > c2);
void readFeatureVector(std::vector < dlib::matrix < float > > &features);
void readKernelMatrix(dlib::matrix < double > &K, uint length);
std::string join(const std::vector < std::string >& v, std::string d);
#endif