ADS
Algorithms and Data Structures
Toggle main menu visibility
Loading...
Searching...
No Matches
Alignment.h
Go to the documentation of this file.
1
/*--------------------------------------------------------------------------*/
2
/*---------------------------- File Alignment.h ----------------------------*/
3
/*--------------------------------------------------------------------------*/
46
/*--------------------------------------------------------------------------*/
47
/*----------------------------- DEFINITIONS --------------------------------*/
48
/*--------------------------------------------------------------------------*/
49
50
#ifndef __ADS_Alignment
51
#define __ADS_Alignment
52
/* self-identification: #endif constant */
53
54
/*--------------------------------------------------------------------------*/
55
/*------------------------------ INCLUDES ----------------------------------*/
56
/*--------------------------------------------------------------------------*/
57
58
#include <algorithm>
59
#include "
ADS/Contract.h
"
60
61
#include <cstddef>
62
#include <string>
63
#include <utility>
64
#include <vector>
65
66
/*--------------------------------------------------------------------------*/
67
/*--------------------------- NAMESPACE ------------------------------------*/
68
/*--------------------------------------------------------------------------*/
69
70
namespace
ADS
71
{
72
74
enum class
Alignment
{
75
GLOBAL
,
76
SEMIGLOBAL
,
77
LOCAL
78
};
79
107
template
<
class
S >
108
int
alignmentScore
(
const
S & P ,
const
S & T ,
Alignment
kind );
109
137
template
<
class
S >
138
std::pair< S , S >
globalAlignment
(
const
S & P ,
const
S & T ,
139
typename
S::value_type gap =
' '
);
140
141
/*--------------------------------------------------------------------------*/
142
143
}
// end( namespace ADS )
144
145
/*--------------------------------------------------------------------------*/
146
/*-------------------------- IMPLEMENTATION --------------------------------*/
147
/*--------------------------------------------------------------------------*/
148
149
#include "ADS/string/impl/Alignment.tpp"
150
151
/*--------------------------------------------------------------------------*/
152
153
#endif
/* Alignment.h included */
154
155
/*--------------------------------------------------------------------------*/
156
/*-------------------------- End File Alignment.h --------------------------*/
157
/*--------------------------------------------------------------------------*/
Contract.h
The contracts of ADS: the preconditions, the postconditions and the invariants of the operations,...
ADS::alignmentScore
int alignmentScore(const S &P, const S &T, Alignment kind)
the best score of an alignment of and
ADS::Alignment
Alignment
the kind of alignment
Definition
Alignment.h:74
ADS::globalAlignment
std::pair< S, S > globalAlignment(const S &P, const S &T, typename S::value_type gap=' ')
a best global alignment, the two strings with the spaces as gap
ADS::Alignment::SEMIGLOBAL
@ SEMIGLOBAL
the spaces at the two ends of either string free
Definition
Alignment.h:76
ADS::Alignment::LOCAL
@ LOCAL
two substrings, as Smith and Waterman
Definition
Alignment.h:77
ADS::Alignment::GLOBAL
@ GLOBAL
the whole strings, as Needleman and Wunsch
Definition
Alignment.h:75
ADS
Definition
ADT.h:96
ADS
string
Alignment.h
Generated by
1.17.0