Changeset 1615 for branches/ralph/src/main/java/de/ugoe/cs
- Timestamp:
- 07/15/14 15:56:46 (10 years ago)
- Location:
- branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/NeedlemanWunsch.java
r1612 r1615 154 154 LinkedList<Integer> aligned1 = new LinkedList<Integer>(); 155 155 LinkedList<Integer> aligned2 = new LinkedList<Integer>(); 156 do{156 while (tmp.getPrevious() != null) { 157 157 158 158 aligned1.add(new Integer(tmp.getXvalue())); … … 160 160 161 161 tmp = tmp.getPrevious(); 162 163 } while (tmp != null); 162 } 164 163 165 164 // reverse order of the alignment … … 168 167 169 168 int count = 0; 170 for (Iterator<Integer> it = aligned1. descendingIterator(); it.hasNext();) {169 for (Iterator<Integer> it = aligned1.iterator(); it.hasNext();) { 171 170 count++; 172 171 reversed1[reversed1.length - count] = it.next(); … … 174 173 } 175 174 count = 0; 176 for (Iterator<Integer> it = aligned2. descendingIterator(); it.hasNext();) {175 for (Iterator<Integer> it = aligned2.iterator(); it.hasNext();) { 177 176 count++; 178 177 reversed2[reversed2.length - count] = it.next(); -
branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/ObjectDistanceSubstitionMatrix.java
r1587 r1615 21 21 private SymbolMap<ITaskInstance, ITask> uniqueTasks; 22 22 private double gapPenalty; 23 23 24 private double positiveThreshold; 24 25 … … 29 30 idmapping = new HashMap<Integer, Integer>(); 30 31 matrix = new TriangleMatrix(uniqueTasks.size()+1); 31 gapPenalty = - 2;32 gapPenalty = -3; 32 33 33 34 } 34 35 35 @Override 36 36 37 public double getGapPenalty() { 37 38 return gapPenalty; 38 39 } 40 41 public void setGapPenalty(double gapPenalty) { 42 this.gapPenalty = gapPenalty; 43 } 39 44 40 @Override41 45 public void generate() { 42 46 -
branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/SequenceForTaskDetectionRuleAlignment.java
r1612 r1615 170 170 } 171 171 } 172 172 173 AlignmentAlgorithmFactory.setDefaultAlgorithm("de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.NeedlemanWunsch"); 174 175 173 176 PairwiseAlignmentStorage matchAlignments = PairwiseAlignmentGenerator.generate(numberseqs, submat); 174 177 UPGMAAligningTree guidetree = new UPGMAAligningTree(matchseqs,matchAlignments,submat);
Note: See TracChangeset
for help on using the changeset viewer.