Changeset 1330 for trunk/autoquest-plugin-alignment/src/main/java/de
- Timestamp:
- 01/22/14 15:45:55 (11 years ago)
- Location:
- trunk/autoquest-plugin-alignment/src/main/java/de/ugoe/cs/autoquest/plugin/alignment
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-plugin-alignment/src/main/java/de/ugoe/cs/autoquest/plugin/alignment/commands/CMDbinaryAlignment.java
r1323 r1330 15 15 package de.ugoe.cs.autoquest.plugin.alignment.commands; 16 16 17 import java.io.File; 18 import java.io.FilenameFilter; 17 19 18 import java.util.Collection; 20 import java.util.Iterator;21 19 import java.util.LinkedList; 22 20 import java.util.List; 23 import java.util.logging.Level;24 21 25 import de.ugoe.cs.autoquest.CommandHelpers;26 22 import de.ugoe.cs.autoquest.eventcore.Event; 27 23 import de.ugoe.cs.autoquest.plugin.alignment.SmithWaterman; 28 import de.ugoe.cs.autoquest.plugin.alignment.seqgen.RandomSequenceGenerator;29 24 import de.ugoe.cs.autoquest.plugin.alignment.seqgen.SimpleSequenceGenerator; 30 import de.ugoe.cs.autoquest.plugin.alignment.substitution.DifferenceSubstitutionMatrix;31 25 import de.ugoe.cs.autoquest.plugin.alignment.substitution.NearbySubstitutionMatrix; 32 import de.ugoe.cs.autoquest.tasktrees.manager.TaskTreeManager; 33 import de.ugoe.cs.autoquest.tasktrees.taskequality.TaskEquality; 34 import de.ugoe.cs.autoquest.tasktrees.temporalrelation.TaskInstanceComparator; 35 import de.ugoe.cs.autoquest.tasktrees.temporalrelation.TaskHandlingStrategy; 36 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask; 37 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskBuilder; 38 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance; 39 import de.ugoe.cs.autoquest.tasktrees.treeifc.IUserSession; 40 import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskBuilder; 41 import de.ugoe.cs.autoquest.usageprofiles.SymbolMap; 26 import de.ugoe.cs.autoquest.plugin.alignment.substitution.ObjectDistanceSubstitionMatrix; 42 27 import de.ugoe.cs.util.console.Command; 43 28 import de.ugoe.cs.util.console.Console; … … 49 34 * </p> 50 35 * 51 * @author Steffen Herbold36 * @author Ralph Krimmel 52 37 * @version 1.0 53 38 */ … … 72 57 73 58 Collection<List<Event>> sequences = new LinkedList<List<Event>>(); 74 sequences = (Collection<List<Event>>) GlobalDataContainer.getInstance() 75 .getData(sequencesName); 59 Object obj = GlobalDataContainer.getInstance().getData(sequencesName); 60 if(obj.getClass().equals(sequences.getClass())) { 61 sequences = (Collection<List<Event>>) obj; 62 } 63 64 65 66 67 76 68 if(sequences != null) { 77 69 Console.println("Number of sequences: " + sequences.size()); … … 81 73 int[] seq1 = gen.get(0); 82 74 int[] seq2 = gen.get(0); 75 ObjectDistanceSubstitionMatrix submat = new ObjectDistanceSubstitionMatrix(); 76 submat.generate(sequences); 83 77 SmithWaterman sw = new SmithWaterman(seq1, seq2, 84 78 new NearbySubstitutionMatrix(seq1, seq2, 10)); 85 79 86 //printDPMatrix();80 sw.printDPMatrix(); 87 81 System.out.println(); 88 sw.printAlignments();82 //sw.printAlignments(); 89 83 // sw.getMatches(); 90 84 } -
trunk/autoquest-plugin-alignment/src/main/java/de/ugoe/cs/autoquest/plugin/alignment/seqgen/SimpleSequenceGenerator.java
r1323 r1330 36 36 TaskTreeManager ttm = new TaskTreeManager(); 37 37 ttm.createTaskModel(sequences); 38 38 39 39 TaskHandlingStrategy preparationTaskHandlingStrategy = new TaskHandlingStrategy(TaskEquality.SEMANTICALLY_EQUAL); 40 40 SymbolMap<ITaskInstance, ITask> uniqueTasks = preparationTaskHandlingStrategy … … 42 42 TaskInstanceComparator comparator = preparationTaskHandlingStrategy 43 43 .getTaskComparator(); 44 int unifiedTasks = 0;45 44 ITask task; 46 45 ITaskBuilder taskBuilder = new TaskBuilder(); 47 46 48 47 List<IUserSession> sessions = ttm.getTaskModel().getUserSessions(); 48 49 49 for (IUserSession session : sessions) { 50 50 //Creating a new sequence that just consists of integers … … 58 58 taskInstance.getTask()); 59 59 templist[i]=taskInstance.getTask().getId(); 60 60 61 } else { 61 62 taskBuilder.setTask(taskInstance, task); 62 unifiedTasks++;63 63 templist[i]=task.getId(); 64 64
Note: See TracChangeset
for help on using the changeset viewer.