# Changeset 265

Ignore:
Timestamp:
Apr 11, 2005, 5:46:00 PM (17 years ago)
Message:

doc added and some changes of variable names

Location:
trunk/src
Files:
2 edited

### Legend:

Unmodified
 r256 /// /// Function calculating the score for the best aligning of two /// sequences. In the dot_matrix \a A, elament \f$A_{ij} \f$ is /// score how well element i in the first sequence match to element /// j in the other sequence. In the aligning the elements from the /// two sequences are matched or a gap is added in one of the /// sequences. The latter is penalized with \a gap, which means if /// \a gap is large there will be no gaps in the best aligning (if /// the sequences have the same length). \a path contains what /// elements in \A that is used in the best path. In case of /// degeneracy only one path is returned. /// Function performing alignment following the Needleman-Wunch /// algorithm. The algorithm starts from the dot-matrix, \a s, where /// \f$s_{ij} \f$ describes how well element \f$i \f$ in the first /// sequence match to element \f$j \f$ in the second sequence. A /// path through this matrix corresponds to an alignment of the two /// sequences, in which a diagonal step over a matrix element /// corresponds to a match between the corresponding sequnce /// elements and a vertical or a horizontal step corresponds to /// inserting a gap in one of the sequnces. The function maximizes /// \f$\sum s_{ij}-n \f$ \a gap, where the first sum goes over all /// matches and the second term is a penalty term for inserting \f$/// n \f$ gaps. Default is to have the \a gap cost set to zero. The /// vector \a path contains information about which elements that /// were matched. If the first element in the first sequence was /// matched to the first element in the second sequence, the last /// element in \a path is pair(0,0). /// /// @return score from the best aligning /// @return the global maximum alignment score. /// double NeedlemanWunsch(const gslapi::matrix& A, double NeedlemanWunsch(const gslapi::matrix& s, std::vector >& path, const double gap);