Changeset 2816
 Timestamp:
 Aug 28, 2012, 4:44:03 AM (10 years ago)
 Location:
 trunk/yat/utility
 Files:

 3 edited
Legend:
 Unmodified
 Added
 Removed

trunk/yat/utility/Aligner.cc
r2815 r2816 74 74 75 75 columns_ = x.columns(); 76 cigar_.resize(columns_*x.rows(), none);76 alignment_.resize(columns_*x.rows(), none); 77 77 78 78 for (size_t i=1; i<x.rows(); ++i) … … 81 81 if (x(i1, j1) + score(i1, j1) > x(i,j)) { 82 82 x(i,j) = x(i1, j1) + score(i1, j1); 83 cigar p(i, j) = diagonal;83 cigar(i, j) = diagonal; 84 84 } 85 85 … … 87 87 if (x(i1, j)horizon_gap_ > x(i,j)) { 88 88 x(i,j) = x(i,j1)  horizon_gap_; 89 cigar p(i,j) = right;89 cigar(i,j) = right; 90 90 } 91 91 } 92 92 else if(x(i,j1)horizon_gap_open_horizon_gap_ > x(i,j)) { 93 93 x(i,j) = x(i,j1)  horizon_gap_  open_horizon_gap_; 94 cigar p(i,j) = right;94 cigar(i,j) = right; 95 95 } 96 96 … … 98 98 if (x(i1,j)  vertical_gap_ > x(i,j)) { 99 99 x(i,j) = x(i1,j)  vertical_gap_; 100 cigar p(i,j) = down;100 cigar(i,j) = down; 101 101 } 102 102 } 103 103 else if (x(i1,j)  vertical_gap_  open_vertical_gap_ > x(i,j)) { 104 104 x(i,j) = x(i1,j)  vertical_gap_  open_vertical_gap_; 105 cigar p(i,j) = down;105 cigar(i,j) = down; 106 106 } 107 107 } … … 109 109 110 110 111 const Aligner::direction& Aligner:: cigar(size_t i, size_t j) const111 const Aligner::direction& Aligner::alignment(size_t i, size_t j) const 112 112 { 113 return cigar_[i*columns_ + j];113 return alignment_[i*columns_ + j]; 114 114 } 115 115 116 116 117 Aligner::direction& Aligner::cigar p(size_t i, size_t j)117 Aligner::direction& Aligner::cigar(size_t i, size_t j) 118 118 { 119 return cigar_[i*columns_ + j];119 return alignment_[i*columns_ + j]; 120 120 } 121 121 
trunk/yat/utility/Aligner.h
r2815 r2816 51 51 Enum used to describe alignment. 52 52 53 \see cigar53 \see alignment 54 54 */ 55 55 enum direction { none, right, down, diagonal }; … … 120 120 was aligned with element j1 in second sequence. 121 121 */ 122 const direction& cigar(size_t i, size_t j) const;122 const direction& alignment(size_t i, size_t j) const; 123 123 124 124 private: 125 direction& cigar p(size_t i, size_t j);125 direction& cigar(size_t i, size_t j); 126 126 127 127 size_t columns_; … … 130 130 double horizon_gap_; 131 131 double open_horizon_gap_; 132 std::vector<direction> cigar_;132 std::vector<direction> alignment_; 133 133 }; 134 134 
trunk/yat/utility/Alignment.cc
r2815 r2816 51 51 path.clear(); 52 52 while (i && j) { 53 if (aligner. cigar(i,j)==Aligner::diagonal) {53 if (aligner.alignment(i,j)==Aligner::diagonal) { 54 54 i; 55 55 j; 56 56 path.push_back(std::make_pair(i,j)); 57 57 } 58 else if (aligner. cigar(i,j)==Aligner::right)58 else if (aligner.alignment(i,j)==Aligner::right) 59 59 j; 60 60 else
Note: See TracChangeset
for help on using the changeset viewer.