source: trunk/GDE/MUSCLE/src/termgaps.cpp

Last change on this file was 10390, checked in by aboeckma, 11 years ago

added muscle sourcles amd makefile

File size: 794 bytes
Line 
1#include "muscle.h"
2#include "profile.h"
3
4void SetTermGaps(const ProfPos *Prof, unsigned uLength)
5        {
6        if (0 == uLength)
7                return;
8
9        ProfPos *First = (ProfPos *) Prof;
10        ProfPos *Last = (ProfPos *) (Prof + uLength - 1);
11
12        switch (g_TermGaps)
13                {
14        case TERMGAPS_Full:
15                break;
16
17        case TERMGAPS_Half:
18        // -infinity check for lock left/right
19                if (First->m_scoreGapOpen != MINUS_INFINITY)
20                        First->m_scoreGapOpen = 0;
21
22                if (uLength > 1 && Last->m_scoreGapClose != MINUS_INFINITY)
23                        Last->m_scoreGapClose = 0;
24
25        case TERMGAPS_Ext:
26                if (First->m_scoreGapOpen != MINUS_INFINITY)
27                        First->m_scoreGapOpen *= -1;
28
29                if (uLength > 1 && Last->m_scoreGapClose != MINUS_INFINITY)
30                        Last->m_scoreGapClose *= -1;
31                break;
32
33        default:
34                Quit("Invalid g_TermGaps");
35                }
36        }
Note: See TracBrowser for help on using the repository browser.