Files
pplus-library/modules/align/affine-gap/routine.pseudo
T
alexm 568474d52f
Test (in pplus-core) / in-core (push) Failing after 28m44s
Initial commit
2026-11-12 22:23:48 -05:00

11 lines
556 B
Plaintext

// AffineGapPenalty: the score of a gap of Length positions under an affine
// gap model (Gotoh, 1982): Open for the first position and Extend for each
// one after it. When Open is more negative than Extend, one long gap scores
// better than several short gaps of the same total length. With
// Open == Extend it is the linear model.
FUNCTION AffineGapPenalty(Length : INTEGER, Open : INTEGER, Extend : INTEGER) RETURNS INTEGER
REQUIRE Length >= 1
ENSURE RESULT == Open + (Length - 1) * Extend
RETURN Open + (Length - 1) * Extend
ENDFUNCTION