Last change
on this file since 1584 was
1584,
checked in by rkrimmel, 10 years ago
|
Some refactoring for storing the initial alignments so we don't need to do them again.
|
File size:
980 bytes
|
Rev | Line | |
---|
[1582] | 1 | package de.ugoe.cs.autoquest.tasktrees.alignment.matrix; |
---|
| 2 | |
---|
[1584] | 3 | |
---|
| 4 | import de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.SmithWatermanRepeated; |
---|
| 5 | |
---|
[1582] | 6 | public class BinaryAlignmentStorage { |
---|
| 7 | |
---|
[1584] | 8 | private SmithWatermanRepeated[][] alignments; |
---|
| 9 | UPGMAMatrix sequenceDistances; |
---|
| 10 | |
---|
| 11 | public BinaryAlignmentStorage(int size) { |
---|
| 12 | alignments = new SmithWatermanRepeated[size][size]; |
---|
| 13 | sequenceDistances = new UPGMAMatrix(size); |
---|
| 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 | } |
---|
[1582] | 36 | } |
---|
[1584] | 37 | |
---|
Note: See
TracBrowser
for help on using the repository browser.