-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
74 lines (57 loc) · 2.63 KB
/
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#include <stdio.h>
#include "bitwise edit distance alignment single word.h"
#include "bitwise edit distance alignment multiple word clean.h"
//test cases
//string lengths are 8 and 8
//edit distance is 2
/*
char *string1 = "ACGTACGT";
char *string2 = "GACGTACT";
int N = 8;
int M = 8;
*/
//string lengths are 30 and 25
//edit distance is 11
/*
char *string1 = "GTCTTCACGGCCTTCACCACCTACATGTAT";
char *string2 = "GGCCTTCACCACCTACATGTATCCT";
int N = 30;
int M = 25;
*/
//string lengths are 65 and 65
//edit distance = 2
char *string1 = "ACGTACGTTTCGCGAGCAGCTTGAATCGACACGTACGTTTCGCGAGCAGCTTGAAACGACTTAGG";
char *string2 = "ACGTACGTTTCGCGAGCAGCTTGAAACGACACGTACGTTTCGCGAGCAGCTTGGAACGACTTAGG";
int N = 65;
int M = 65;
//string lengths are 255 and 254
//edit distance is 3
/*
char *string1 = "GCTTCCTGACTCCTCATCCACCATCATTTCTGCCTGTACACCATGTTGCCTCACACCTGGCAATAAGAAAACTCATCTTTGTCCTCACTGTAATGGAATAATGTGGGGTTTTTTCTTCATTATGCAGCTTTCCTCTTGATTTTCCTCTTAGTTCTCCTCTTGATTCTCTCTTGATTCACTGTCTTGAAAAGTGCTCTGAATTTTTTTACCCCTTAAGACTTTTGCAAGAAGATGCAGCAGAAGTATGGATGAGGA";
char *string2 = "GCTTCCTGACTCCTCACCACCATCATTTCTGCCTGTACACCATGTTGCCTCACACCTGGCAATAAGAAAACTCATCTTTGTCCTCACTGTAATGGAATAATGTGGGGTTTTTTTCTTCATTATGCAGCTTTCCTCTTGATTTTCCTCTTAGTTCTCCTCTTGATTCTCTCTTGATCACTGTCTTGAAAAGTGCTCTGAATTTTTTTACCCCTTAAGACTTTTGCAAGAAGATGCAGCAGAAGTATGGATGAGGA";
int N = 255;
int M = 254;
*/
//string lengths are 300 and 300
//edit distance is 164
/*
char *string1 = "TTCGCGGAGTGGGATTCTACTGTGGAGTGATGCAGATTTTCCATTAAGATAACTCTAGCGTATACCGGTGTGAATAGTTCCTTCTCGTGCCCCTCACGCAGCGCCCGCAGGGATGCTTCGTCGCTAATTAGCTCGGTACGTAGCTTGCCTCCAATCATAACCGCGAAAGGATTCCCACTTGGACATGCGGCCTACCGGTGCAATCCAAAATTGGCACCTTGCTAATACAGGGCTGCGCGAAATCGTGTGGCGCCCAGCAGAAATAAAAGACCGAAACCGCTACCTAGCCTACGAGGCTTG";
char *string2 = "AGCGTAGTGTAAATGAGAAGGGCGTCGTCGGCGCTCTCGATCTTTCGAGCAGCGCATCTCAACGGCTAAGGATGTCTTTAAGAAAGGACGTAAAGTACCACATGATCTAAAACTGCCGCACCCTTAATCATCGTCGGATTACGAGTTCTCCCATTCGAGATGGCCTTAACGACGTTAAGATACATTCCGTCTCATGTACCACCCGCCGATAAATTCGTCCTCCACAACGACTTTGGAAAAGCGGGACGTGAGAGACTTTGCTACGGCCTCTGAGTAACGACGTACCGTTGGTTGTGACAC";
int N = 300;
int M = 300;
*/
int main (int argc, const char * argv[]) {
int score;
printf("\nString 1: %s",string1);
printf("\nlength = %d\n", M);
printf("\nString 2: %s",string2);
printf("\nlength = %d\n", N);
//use this for single word (64 bit) processing
//max string1 length is 63 characters
//score = Edit_Distance_single_word(string1,string2,N,M);
//printf("\nSingle Word Unit Cost Edit Distance = %d",score);
//use this for strings of any size
score = Edit_Distance_multiple_word_clean(string1,string2,N,M);
printf("\n\nMultiple Word Unit Cost Edit Distance = %d\n",score);
return 0;
}