complexip.h
3.6 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
#ifndef DEF_COMPIP
#define DEF_COMPIP
#include <vector>
#include <string>
#include "structure.h"
#include "solinteraction.h"
class ComplexIP
{
public:
ComplexIP(const std::vector< int > &rnaList, const std::vector< std::string > &rnaName, const std::vector< std::string > &seqList, const std::vector< Structure > &strList, const std::vector< SolInteraction > &inteList, double score);
ComplexIP();
~ComplexIP();
void loadListBP_();
void loadListsBP_();
std::vector< int > get_rnaList_() const;
std::vector< std::string > get_rnaName_() const;
std::vector< std::string > get_seqList_() const;
std::vector< Structure > get_strList_() const;
std::vector< SolInteraction > get_inteList_() const;
double get_obj1_() const;
int get_nbCt_() const;
std::vector< std::vector< double > > get_var_() const; //ip
std::vector < std::vector < double > > get_vari_() const; //ip
std::vector < std::pair < std::pair < int, int > , std::pair < int, int > > > get_listBP_() const;
std::vector < std::vector < std::pair < std::pair < int, int > , std::pair < int, int > > > > get_listsBP_() const;
void set_obj1_(double obj1);
void set_nbCt_(int nbCt);
void set_var_(std::vector< std::vector< double > > var); //ip
void set_vari_(const std::vector < std::vector < double > > &vari); //ip
void set_rnaList_(const std::vector< int > &rnaList);
void set_rnaName_(const std::vector< std::string > &rnaName);
void set_seqList_(const std::vector< std::string > &seqList);
void set_strList_(const std::vector< Structure > &strList);
void set_inteList_(const std::vector< SolInteraction > &inteList);
std::vector< std::vector < std::vector < int > > > permutation(std::vector< std::vector < std::vector < int > > > oldLevel, std::vector< std::vector < std::vector < int > > > combi, int max) const;
std::string convToDP();
std::string to_string();
std::string to_Json();
std::string to_forna();
bool operator<(const ComplexIP &c);
bool operator<(const ComplexIP &c) const;
bool operator>(const ComplexIP &c);
bool operator>(const ComplexIP &c) const;
bool operator<=(const ComplexIP &c);
bool operator<=(const ComplexIP &c) const;
bool operator>=(const ComplexIP &c);
bool operator>=(const ComplexIP &c) const;
bool operator==(const ComplexIP &c);
bool operator==(const ComplexIP &c) const;
bool operator!=(const ComplexIP &c);
bool operator!=(const ComplexIP &c) const;
std::pair < std::pair < int, int > , std::pair < int, int > > invert(std::pair < std::pair < int, int > , std::pair < int, int > > pair) const;
static bool isEquivalent(const ComplexIP &c1, const ComplexIP &c2);
private:
std::vector < int > rnaList_; // Vector to store the rna
std::vector < std::string > rnaName_; // Vector to store the name of the rna
std::vector < std::string > seqList_; // Vector to store the sequences
std::vector< Structure > strList_; // Vector to store the structures
std::vector< SolInteraction > inteList_; // Vector to store the interactions
std::vector < std::pair < std::pair < int, int > , std::pair < int, int > > > listBP_; // Store the base pairs
std::vector < std::vector < std::pair < std::pair < int, int > , std::pair < int, int > > > > listsBP_; // Store id base pair if there are identical sequences of rna
double obj1_;
int nbCt_;
std::vector< std::vector< double > > var_; // IP values of the decision variable of the integer program
std::vector < std::vector < double > > vari_; // IP
};
#endif