MCPcopy Create free account
hub / github.com/Martinsos/edlib / AlignmentData

Class AlignmentData

edlib/src/edlib.cpp:19–44  ·  view source on GitHub ↗

Data needed to find alignment.

Source from the content-addressed store, hash-verified

17
18// Data needed to find alignment.
19struct AlignmentData {
20 Word* Ps;
21 Word* Ms;
22 int* scores;
23 int* firstBlocks;
24 int* lastBlocks;
25
26 AlignmentData(int maxNumBlocks, int targetLength) {
27 // We build a complete table and mark first and last block for each column
28 // (because algorithm is banded so only part of each columns is used).
29 // TODO: do not build a whole table, but just enough blocks for each column.
30 Ps = new Word[maxNumBlocks * targetLength];
31 Ms = new Word[maxNumBlocks * targetLength];
32 scores = new int[maxNumBlocks * targetLength];
33 firstBlocks = new int[targetLength];
34 lastBlocks = new int[targetLength];
35 }
36
37 ~AlignmentData() {
38 delete[] Ps;
39 delete[] Ms;
40 delete[] scores;
41 delete[] firstBlocks;
42 delete[] lastBlocks;
43 }
44};
45
46struct Block {
47 Word P; // Pvin

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected