-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcphelix.h
113 lines (88 loc) · 3.27 KB
/
cphelix.h
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
/******************************************************************************
* Copyright (C) 2014 Juan Antonio Garcia Martin , Peter Clote, Ivan Dotu *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
******************************************************************************/
#include <vector>
#include "energy_constant.h"
#ifndef _CP_HELIX
#define _CP_HELIX
namespace operations_research {
class CPHelix{
public:
~CPHelix();
CPHelix(int _id, int _i, int _j);
int getId();
void setId(int _id);
int getI();
void setI(int _i);
int getJ();
void setJ(int _j);
int getTryLeft();
void setTryLeft(int new_val);
int getTryRight();
void setTryRight(int new_val);
int getParent();
void setParent(int _parent);
int getLevel();
void setLevel(int _level);
int getLeavesDistance();
void setLeavesDistance(int distance);
int getPosLeft();
void setPosLeft(int npos);
int getPosRight();
void setPosRight(int npos);
void addInside(int h);
void removeInside(int h);
std::vector<int> getInside();
int contains(CPHelix* h);
void setHelixPositions(std::vector<CPHelix*> helices);
std::vector<int> getPositions();
void addPositions(std::vector<int> newPositions);
int getPositionsIntersect(std::vector<int> newPositions);
void adaptToRemoveOf(int h);
int getStackingEnergy(int* str_int, int* hairpin37, int bp_energy);
void setPositionIndexAndType(int* str_int, std::vector<int> BPO, std::vector<int> BPC);
std::vector<int> getBPs();
void addBPs(std::vector<int> newBPs);
std::vector<int> getClosingBPs();
void addClosingBPs(std::vector<int> newCBPs);
std::vector<int> getBPpositions();
int getBPintersect(std::vector<int> newBPpositions);
std::vector<int> getUPs();
void addUPs(std::vector<int> newUPs);
std::vector<int> getOrderedUPs(int* str_int);
bool isStack(int bp);
void toString();
private:
int id;
int i;
int j;
int parent;
int level;
int pos_left;
int pos_right;
int try_left;
int try_right;
int leaves_distance;
std::vector<int> inside;
std::vector<int> positions;
std::vector<int> bps;
std::vector<int> cbps;
std::vector<int> ups;
std::vector<int> stackBPs;
std::vector<int> bpPositions;
};
}
#endif