more thoroughly document FLPs
authorDiane Trout <diane@caltech.edu>
Thu, 23 Feb 2006 02:23:23 +0000 (02:23 +0000)
committerDiane Trout <diane@caltech.edu>
Thu, 23 Feb 2006 02:23:23 +0000 (02:23 +0000)
alg/flp.hh

index 69992087e9c35d3f25dfd61e714d70fb2ad66a45..9861fbb597077540409f1d8ce5cb8d783f684e80 100644 (file)
@@ -25,7 +25,7 @@
 class FLPs
 {
   private:
-    //! the number of base pairs used to compute this sliding window
+    //! the number of base pairs in the sliding window
     int window_size;
     //! the minimum tnumber of base pairs need for this window to be saved.
     int hard_threshold;
@@ -36,14 +36,20 @@ class FLPs
       int score;
     };
     //! add a match from location seq1_i to seq2_i with a threshold of a_score
-    //! i2_offset is used to shift the window start when doing a reverse 
-    //! compliment. (This is called by seqcomp() )
+    /*! i2_offset is used to shift the window start when doing a reverse 
+     * compliment. (This is called by seqcomp() )
+     */
     inline void add(int seq1_i, int seq2_i, int a_score, int i2_offset);
+    //! this list of matches between the two sequences
     /*! All of the matches are stored here, it appears each window position
      *  in sequence 1 gets an entry in the vector, the list contains matches
      *  between sequence 1 and sequence 2
      */
     std::vector<std::list<match> > *all_matches;
+    //! reserve space for the appropriate number of windows.
+    /*! this is mostly so seqcomp can use operator[]
+     */
+    void alloc_matches(std::string::size_type len1=0);
 
   public:
     FLPs();
@@ -53,16 +59,17 @@ class FLPs
      * for enough windows for the size of sequence 1
      */
     void setup(int win_size, int hard_thres);
-    void alloc_matches(std::string::size_type len1=0);
+    //! compare two sequences and store the list of results in all_matches
     void seqcomp(std::string seq1, std::string seq2, bool is_RC);
-  //bool FLPs::match_less(match *match1, match *match2);
-  //void FLPs::sort();
+    //bool FLPs::match_less(match *match1, match *match2);
+    //void FLPs::sort();
     //! Return all the matches for a particular window?
     std::list<int> matches(int index);
     //! Return all the matches for a particular window abouve threshold
     std::list<int> thres_matches(int index, int thres);
     //! Return the number of windows stored in this FLPs
-    //! (this is should be the same as seq1_len-window_size+1
+    /*! (this is should be the same as seq1_len-window_size+1
+     */
     int size() const;
     //! Save all the FLPs to save_file_path
     void save(std::string save_file_path);