Changeset 1760 for branches/autoquest-core-tasktrees-alignment
- Timestamp:
- 09/23/14 13:55:37 (10 years ago)
- Location:
- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/Match.java
r1747 r1760 4 4 package de.ugoe.cs.autoquest.tasktrees.alignment.algorithms; 5 5 6 import java.io.Serializable;7 import java.util.ArrayList;8 6 import java.util.Iterator; 9 7 import java.util.LinkedList; … … 13 11 * The Class Match. 14 12 */ 15 public class Match implements Cloneable,Comparable<Match>,Serializable { 16 17 /** The Constant serialVersionUID. */ 18 private static final long serialVersionUID = -3206992723755714741L; 13 public class Match { 19 14 20 15 /** The matchseqs. */ 21 private final ArrayList<NumberSequence>matchseqs;16 private final NumberSequence[] matchseqs; 22 17 23 18 /** The occurences. */ … … 28 23 */ 29 24 public Match() { 30 matchseqs = new ArrayList<NumberSequence>(2);25 matchseqs = new NumberSequence[2]; 31 26 occurrences = new LinkedList<MatchOccurrence>(); 32 matchseqs.add(null); 33 matchseqs.add(null); 34 } // TODO Auto-generated method stub 27 28 } 35 29 36 30 /** 37 * Adds the occur ence.31 * Adds the occurrence. 38 32 * 39 * @param occurence the occur ence33 * @param occurence the occurrence 40 34 */ 41 35 public void addOccurence(MatchOccurrence occurence) { … … 74 68 */ 75 69 public NumberSequence getFirstSequence() { 76 return matchseqs .get(0);70 return matchseqs[0]; 77 71 } 78 72 … … 92 86 */ 93 87 public NumberSequence getSecondSequence() { 94 return matchseqs .get(1);88 return matchseqs[1]; 95 89 } 96 90 … … 110 104 */ 111 105 public void setFirstSequence(NumberSequence seq) { 112 matchseqs .set(0, seq);106 matchseqs[0] = seq; 113 107 } 114 108 … … 128 122 */ 129 123 public void setSecondSequence(NumberSequence seq) { 130 matchseqs .set(1, seq);124 matchseqs[1] = seq; 131 125 } 132 126 … … 169 163 * @throws CloneNotSupportedException the clone not supported exception 170 164 */ 165 /* 171 166 public Match cloneWithoutOccurrences() { 172 167 Match result = new Match(); … … 174 169 result.setSecondSequence(this.getSecondSequence()); 175 170 return result; 176 } 171 }*/ 177 172 178 179 173 180 174 /** 181 175 * Size. … … 185 179 public int size() { 186 180 // Both sequences should be equally long 187 return matchseqs .get(0).size();181 return matchseqs[0].size(); 188 182 } 189 190 /* (non-Javadoc)191 * @see java.lang.Comparable#compareTo(java.lang.Object)192 */193 @Override194 public int compareTo(Match arg0) {195 196 return 0;197 }198 199 183 } -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/SmithWatermanRepeated.java
r1741 r1760 126 126 127 127 for (int j = 2; j <= length2; j++) { 128 if (matrix[i - 1][j].getScore() > tempMax) {128 if (matrix[i - 1][j].getScore()-scoreThreshold > tempMax) { 129 129 tempMax = matrix[i - 1][j].getScore(); 130 130 maxRowIndex = j; -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/RuleUtils.java
r1749 r1760 17 17 import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration; 18 18 import de.ugoe.cs.autoquest.tasktrees.treeifc.IMarkingTemporalRelationship; 19 import de.ugoe.cs.autoquest.tasktrees.treeifc.IStructuringTemporalRelationship;20 19 import de.ugoe.cs.autoquest.tasktrees.treeifc.IOptional; 21 20 import de.ugoe.cs.autoquest.tasktrees.treeifc.IOptionalInstance; -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/SequenceForTaskDetectionRuleAlignment.java
r1749 r1760 16 16 17 17 import java.io.Serializable; 18 import java.util.ArrayDeque; 18 19 import java.util.ArrayList; 19 20 import java.util.Collections; … … 167 168 appData.getStopWatch().stop("task replacement"); 168 169 appData.getStopWatch().stop("whole loop"); 169 //appData.getStopWatch().dumpStatistics(System.out);170 appData.getStopWatch().dumpStatistics(System.out); 170 171 appData.getStopWatch().reset(); 171 172 172 // } while (appData.detectedAndReplacedTasks()||iteration < maxIterations); 173 } 174 while (iteration < maxIterations); 173 } while (appData.detectedAndReplacedTasks()); 174 //} while (iteration < maxIterations); 175 175 Console.println("created " + appData.getResult().getNewlyCreatedTasks().size() + 176 176 " new tasks and " + appData.getResult().getNewlyCreatedTaskInstances().size() + … … 666 666 } 667 667 } 668 appData.matchseqs =null; 668 669 } 669 670 … … 1123 1124 private final ObjectDistanceSubstitionMatrix submat; 1124 1125 1125 private LinkedList<PlannedReplacement>[] plannedReplacements;1126 private ArrayDeque<PlannedReplacement>[] plannedReplacements; 1126 1127 1127 1128 /** The list of all found matches */ … … 1173 1174 1174 1175 private void initializeQueues(int size) { 1175 plannedReplacements = new LinkedList[size];1176 plannedReplacements = new ArrayDeque[size]; 1176 1177 for (int i = 0; i < size; i++) { 1177 plannedReplacements[i] = new LinkedList<PlannedReplacement>();1178 } 1179 } 1180 1181 public Queue<PlannedReplacement>[] getPlannedReplacements() {1178 plannedReplacements[i] = new ArrayDeque<PlannedReplacement>(30); 1179 } 1180 } 1181 1182 public ArrayDeque<PlannedReplacement>[] getPlannedReplacements() { 1182 1183 return plannedReplacements; 1183 1184 }
Note: See TracChangeset
for help on using the changeset viewer.