Update mussa to build on ubuntu 10.04 with qt 4.6.2 +boost 1.40.0.1
[mussa.git] / alg / flp.hpp
index 75298a4f827def1ab50367089b20b289d5a85f02..2aed0ba4845dc5ba576b01b5746bde288bd67e11 100644 (file)
@@ -20,6 +20,7 @@
 #include <vector>
 #include <iostream>
 
+class Sequence;
 //! FLP = Fixed Length Pairs (Data)
 /*!
  * vector of linked lists of the match type struct
@@ -27,6 +28,8 @@
 class FLPs
 {
 public:
+    typedef size_t size_type;
+    
     FLPs();
     FLPs(const FLPs& );
     //! Setup a FLP and reserve space for the match lists
@@ -46,10 +49,10 @@ public:
 
     void setup(int win_size, int hard_thres);
     //! compare two sequences and store the list of results in all_matches
-    void seqcomp(std::string seq1, std::string seq2, bool is_RC);
+    void seqcomp(const Sequence& seq1, const Sequence& seq2, bool is_RC);
     //bool FLPs::match_less(match *match1, match *match2);
     //void FLPs::sort();
-    //! Return all the matches for a particular window?
+    //! Return all the matches for a particular window? (index and score pairs)
     std::list<match> matches(int index) const;
     //! Return all the match indexes for a particular window?
     std::list<int> match_locations(int index) const;
@@ -89,7 +92,10 @@ public:
     /*! this is mostly so seqcomp can use operator[]
      */
     void alloc_matches(std::string::size_type len1=0);
-
+    
+    //! make sure that a sequence is acceptable to seqcomp
+    void validate_sequence(const Sequence&) const;
+    
     //! current loop index
     int seqcomp_i;
     //! end seqcomp index (when terminating, seqcomp_i == seqcomp_end.