source: branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/BinaryAlignmentStorage.java @ 1585

Last change on this file since 1585 was 1585, checked in by rkrimmel, 10 years ago

Multiple Alignment first version

File size: 1015 bytes
Line 
1package de.ugoe.cs.autoquest.tasktrees.alignment.matrix;
2
3
4import de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.SmithWatermanRepeated;
5
6public class BinaryAlignmentStorage {
7
8    private SmithWatermanRepeated[][] alignments;
9    UPGMAMatrix sequenceDistances;
10   
11    public BinaryAlignmentStorage(int sizex, int sizey) {
12        alignments = new SmithWatermanRepeated[sizex+1][sizey+1];
13        sequenceDistances = new UPGMAMatrix(Math.max(sizex,sizey));
14        sequenceDistances.initialize(Double.POSITIVE_INFINITY);
15    }
16   
17    public void set(int i,int j,SmithWatermanRepeated sw) {
18        alignments[i][j] = sw;
19    }
20   
21    public SmithWatermanRepeated get(int i,int j) {
22        return alignments[i][j];
23    }
24   
25    public void setDistance(int i,int j,double distance) {
26        sequenceDistances.set(i, j, distance);
27    }
28   
29    public double getDistance(int i,int j) {
30        return sequenceDistances.get(i,j);
31    }
32   
33    public UPGMAMatrix getDistanceMatrix() {
34        return sequenceDistances;
35    }
36}
37
Note: See TracBrowser for help on using the repository browser.