Changeset 1568 for branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/substitution
- Timestamp:
- 06/18/14 08:59:41 (10 years ago)
- Location:
- branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/substitution
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/substitution/DifferenceSubstitutionMatrix.java
r1554 r1568 29 29 * @see de.ugoe.cs.autoquest.plugin.alignment.SubstitutionMatrix#getDistance(int, int) 30 30 */ 31 public floatgetDistance(int pos1, int pos2) {31 public double getDistance(int pos1, int pos2) { 32 32 return maxValue - (input1[pos1] - input2[pos2]); 33 33 } … … 49 49 50 50 @Override 51 public floatgetGapPenalty() {51 public double getGapPenalty() { 52 52 return -maxValue; 53 53 } -
branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/substitution/NearbySubstitutionMatrix.java
r1554 r1568 29 29 * @see de.ugoe.cs.autoquest.plugin.alignment.SubstitutionMatrix#getDistance(int, int) 30 30 */ 31 public floatgetDistance(int pos1, int pos2) {31 public double getDistance(int pos1, int pos2) { 32 32 int difference = Math.abs(input1[pos1]-input2[pos2]); 33 33 if(difference < range) { … … 41 41 42 42 @Override 43 public floatgetGapPenalty() {43 public double getGapPenalty() { 44 44 return -range-1; 45 45 } -
branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/substitution/ObjectDistanceSubstitionMatrix.java
r1559 r1568 26 26 private TriangleMatrix matrix; 27 27 private SymbolMap<ITaskInstance, ITask> uniqueTasks; 28 private floatgapPenalty;29 private floatpositiveThreshold;28 private double gapPenalty; 29 private double positiveThreshold; 30 30 31 31 public ObjectDistanceSubstitionMatrix( … … 40 40 41 41 @Override 42 public floatgetGapPenalty() {42 public double getGapPenalty() { 43 43 return gapPenalty; 44 44 } … … 48 48 int index = 0; 49 49 //TODO We need to determine this parameter before generating the matrix.. 50 float meandistance = 18;50 //float meandistance = 18; 51 51 //TODO We need to determine this parameter before generating the matrix.. 52 52 float maxDistance =34; … … 58 58 eti1 = (IEventTaskInstance) obj1; 59 59 } 60 //System.out.println(eti1.getTask().toString()); 60 61 61 62 for (Iterator<ITaskInstance> jt = uniqueTasks.getSymbols() … … 121 122 122 123 @Override 123 public floatgetDistance(int taskId1, int taskId2) {124 public double getDistance(int taskId1, int taskId2) { 124 125 //System.out.println("Taskid1: " + taskId1 + " Taskid2: " + taskId2 + " Idmapping1: " + idmapping.get(taskId1) + " Idmapping2: " + idmapping.get(taskId2)); 125 126 return matrix.get(idmapping.get(taskId1),idmapping.get(taskId2)); -
branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/substitution/SubstitutionMatrix.java
r1554 r1568 11 11 12 12 13 public floatgetDistance(int pos1, int pos2);13 public double getDistance(int pos1, int pos2); 14 14 15 public floatgetGapPenalty();15 public double getGapPenalty(); 16 16 17 17 public void generate(); -
branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/substitution/TriangleMatrix.java
r1558 r1568 3 3 public class TriangleMatrix { 4 4 5 private float[] matrix;5 private double[] matrix; 6 6 private int size; 7 7 8 8 public TriangleMatrix(int size) { 9 9 this.size = size; 10 matrix = new float[size*(size+1)/2];10 matrix = new double [size*(size+1)/2]; 11 11 } 12 12 13 public floatget(int first, int second) {13 public double get(int first, int second) { 14 14 int row = Math.min(first, second); 15 15 int col = Math.max(first, second); … … 18 18 } 19 19 20 public void set(int first, int second, floatvalue) {20 public void set(int first, int second, double value) { 21 21 int row = Math.min(first, second); 22 22 int col = Math.max(first, second);
Note: See TracChangeset
for help on using the changeset viewer.