Class: Align::BasicScoring
- Inherits:
-
Object
- Object
- Align::BasicScoring
- Defined in:
- lib/align/basic_scoring.rb
Overview
Basic Scoring interface
Instance Method Summary collapse
-
#initialize(align_match, align_mismatch, gap_penalty) ⇒ BasicScoring
constructor
A new instance of BasicScoring.
- #score_align(a, b) ⇒ Object
- #score_delete(a) ⇒ Object
- #score_insert(a) ⇒ Object
Constructor Details
#initialize(align_match, align_mismatch, gap_penalty) ⇒ BasicScoring
Returns a new instance of BasicScoring.
7 8 9 10 11 |
# File 'lib/align/basic_scoring.rb', line 7 def initialize(align_match, align_mismatch, gap_penalty) @align_match = align_match @align_mismatch = align_mismatch @gap_penalty = gap_penalty end |
Instance Method Details
#score_align(a, b) ⇒ Object
13 14 15 |
# File 'lib/align/basic_scoring.rb', line 13 def score_align(a,b) (a == b) ? @align_match : @align_mismatch end |
#score_delete(a) ⇒ Object
21 22 23 |
# File 'lib/align/basic_scoring.rb', line 21 def score_delete(a) @gap_penalty end |
#score_insert(a) ⇒ Object
17 18 19 |
# File 'lib/align/basic_scoring.rb', line 17 def score_insert(a) @gap_penalty end |