7be0229f1e098254d07ec63a113aa621ef211d87
[mussa.git] / flp.hh
1 //                        ----------------------------------------
2 //                            ---------- flp.hh  -----------
3 //                        ----------------------------------------
4
5 #include "sequence.hh"
6
7
8 // FLP = Fixed Length Pairs (Data)
9 // vector of linked lists of the match type struct
10 class FLPs
11 {
12   private:
13     int window_size;
14     int hard_threshold;
15     int seq1_length, seq2_length, seq1_win_num, seq2_win_num;
16     string ana_type;
17
18
19     struct match
20     {
21       int index;
22       int score;
23     };
24
25
26
27
28   public:
29     FLPs();
30     void setup(string type, int win_size, int hard_thres, int len1, int len2);
31     inline void add(int seq1_i, int seq2_i, int a_score, int i2_offset);
32     void seqcomp(string seq1, string seq2, bool is_RC);
33   //bool FLPs::match_less(match *match1, match *match2);
34   //void FLPs::sort();
35     list<int> matches(int index);
36   //version with int threshold 
37     list<int> thres_matches(int index, int thres);
38     int win_num();
39     void file_save(string save_file_path);
40     void file_load(string file_path);
41
42     vector<list<match> > all_matches;
43 };