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