SW#
All Files Functions Variables Typedefs Macros
scorer.h
Go to the documentation of this file.
1 /*
2 swsharp - CUDA parallelized Smith Waterman with applying Hirschberg's and
3 Ukkonen's algorithm and dynamic cell pruning.
4 Copyright (C) 2013 Matija Korpar, contributor Mile Šikić
5 
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10 
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15 
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18 
19 Contact the author by mkorpar@gmail.com.
20 */
27 #ifndef __SWSHARP_SCORERH__
28 #define __SWSHARP_SCORERH__
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
42 typedef struct Scorer Scorer;
43 
59 extern Scorer* scorerCreate(const char* name, int* scores, char maxCode,
60  int gapOpen, int gapExtend);
61 
67 extern void scorerDelete(Scorer* scorer);
68 
78 extern int scorerGetGapExtend(Scorer* scorer);
79 
89 extern int scorerGetGapOpen(Scorer* scorer);
90 
100 extern char scorerGetMaxCode(Scorer* scorer);
101 
111 extern int scorerGetMaxScore(Scorer* scorer);
112 
122 extern const char* scorerGetName(Scorer* scorer);
123 
135 extern int scorerIsScalar(Scorer* scorer);
136 
149 extern int scorerScore(Scorer* scorer, char a, char b);
150 
160 extern Scorer* scorerDeserialize(char* bytes);
161 
171 extern void scorerSerialize(char** bytes, int* bytesLen, Scorer* scorer);
172 
182 extern char scorerDecode(char c);
183 
200 extern char scorerEncode(char c);
201 
202 #ifdef __cplusplus
203 }
204 #endif
205 #endif // __SWSHARP_SCORERH__
Scorer * scorerDeserialize(char *bytes)
Scorer deserialization method.
char scorerDecode(char c)
Scorer static decoding method.
char scorerEncode(char c)
Scorer static encoding method.
void scorerDelete(Scorer *scorer)
Scorer destructor.
char scorerGetMaxCode(Scorer *scorer)
Max code getter.
struct Scorer Scorer
Scorer object used for alignment scoring.
Definition: scorer.h:42
int scorerIsScalar(Scorer *scorer)
Scalar getter.
int scorerScore(Scorer *scorer, char a, char b)
Scores two codes.
const char * scorerGetName(Scorer *scorer)
Name getter.
int scorerGetGapOpen(Scorer *scorer)
Gap open penalty getter.
Scorer * scorerCreate(const char *name, int *scores, char maxCode, int gapOpen, int gapExtend)
Scorer constructor.
int scorerGetGapExtend(Scorer *scorer)
Gap extend penalty getter.
void scorerSerialize(char **bytes, int *bytesLen, Scorer *scorer)
Scorer serialization method.
int scorerGetMaxScore(Scorer *scorer)
Max score getter.