- Timestamp:
- 12/17/13 10:02:04 (11 years ago)
- Location:
- trunk/autoquest-plugin-alignment/src/main/java/de/ugoe/cs/autoquest/plugin/alignment
- Files:
-
- 1 added
- 4 edited
- 4 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-plugin-alignment/src/main/java/de/ugoe/cs/autoquest/plugin/alignment/SmithWaterman.java
r1314 r1323 3 3 import java.util.ArrayList; 4 4 import java.util.List; 5 6 import de.ugoe.cs.autoquest.plugin.alignment.substitution.SubstitutionMatrix; 5 7 6 8 public class SmithWaterman implements Alignment { -
trunk/autoquest-plugin-alignment/src/main/java/de/ugoe/cs/autoquest/plugin/alignment/commands/CMDbinaryAlignment.java
r1314 r1323 25 25 import de.ugoe.cs.autoquest.CommandHelpers; 26 26 import de.ugoe.cs.autoquest.eventcore.Event; 27 import de.ugoe.cs.autoquest.plugin.alignment.NearbySubstitutionMatrix;28 27 import de.ugoe.cs.autoquest.plugin.alignment.SmithWaterman; 29 import de.ugoe.cs.autoquest.plugin.alignment.DifferenceSubstitutionMatrix;30 28 import de.ugoe.cs.autoquest.plugin.alignment.seqgen.RandomSequenceGenerator; 29 import de.ugoe.cs.autoquest.plugin.alignment.seqgen.SimpleSequenceGenerator; 30 import de.ugoe.cs.autoquest.plugin.alignment.substitution.DifferenceSubstitutionMatrix; 31 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; 31 42 import de.ugoe.cs.util.console.Command; 32 43 import de.ugoe.cs.util.console.Console; … … 48 59 * @see de.ugoe.cs.util.console.Command#run(java.util.List) 49 60 */ 50 @Override51 61 public void run(List<Object> parameters) { 52 62 String sequencesName; … … 64 74 sequences = (Collection<List<Event>>) GlobalDataContainer.getInstance() 65 75 .getData(sequencesName); 66 Console.println("Number of sequences: " + sequences.size()); 67 for (Iterator<List<Event>> it = sequences.iterator(); it.hasNext();) { 68 List<Event> ev = it.next(); 69 RandomSequenceGenerator randgen1 = new RandomSequenceGenerator(1, 70 80, 3000); 71 RandomSequenceGenerator randgen2 = new RandomSequenceGenerator(1, 72 80, 3000); 73 74 int[] seq1 = randgen1.generate(ev); 75 int[] seq2 = randgen2.generate(ev); 76 SmithWaterman sw = new SmithWaterman(seq1, seq2, 77 new NearbySubstitutionMatrix(seq1, seq2,10)); 76 if(sequences != null) { 77 Console.println("Number of sequences: " + sequences.size()); 78 78 79 //sw.printDPMatrix();80 System.out.println();81 //sw.printAlignments();82 sw.getMatches();83 Console.println("Number of events in sequence: " + ev.size());84 }79 SimpleSequenceGenerator gen = new SimpleSequenceGenerator(); 80 gen.generate(sequences); 81 int[] seq1 = gen.get(0); 82 int[] seq2 = gen.get(0); 83 SmithWaterman sw = new SmithWaterman(seq1, seq2, 84 new NearbySubstitutionMatrix(seq1, seq2, 10)); 85 85 86 } 86 //printDPMatrix(); 87 System.out.println(); 88 sw.printAlignments(); 89 // sw.getMatches(); 90 } 91 } 92 87 93 88 94 /* -
trunk/autoquest-plugin-alignment/src/main/java/de/ugoe/cs/autoquest/plugin/alignment/seqgen/ISequenceGenerator.java
r1320 r1323 1 1 package de.ugoe.cs.autoquest.plugin.alignment.seqgen; 2 2 3 import java.util.Collection; 3 4 import java.util.List; 5 4 6 import de.ugoe.cs.autoquest.eventcore.Event; 5 7 6 public interface SequenceGenerator { 7 public int[] generate(List<Event> eventList); 8 public interface ISequenceGenerator { 9 10 public void generate(Collection<List<Event>> eventList); 11 public int[] get(int index); 12 13 14 15 8 16 } -
trunk/autoquest-plugin-alignment/src/main/java/de/ugoe/cs/autoquest/plugin/alignment/seqgen/RandomSequenceGenerator.java
r1314 r1323 1 1 package de.ugoe.cs.autoquest.plugin.alignment.seqgen; 2 2 import de.ugoe.cs.autoquest.eventcore.Event; 3 4 import java.util.Collection; 3 5 import java.util.List; 4 6 5 public class RandomSequenceGenerator implements SequenceGenerator{7 public class RandomSequenceGenerator implements ISequenceGenerator{ 6 8 7 9 private int min; … … 23 25 return result; 24 26 } 27 28 @Override 29 public void generate(Collection<List<Event>> eventList) { 30 // TODO Auto-generated method stub 31 32 } 33 34 @Override 35 public int[] get(int index) { 36 // TODO Auto-generated method stub 37 return null; 38 } 25 39 } -
trunk/autoquest-plugin-alignment/src/main/java/de/ugoe/cs/autoquest/plugin/alignment/seqgen/SimpleSequenceGenerator.java
r1322 r1323 57 57 uniqueTasks.addSymbol(taskInstance, 58 58 taskInstance.getTask()); 59 templist[i]=taskInstance.getTask().getId(); 59 60 } else { 60 61 taskBuilder.setTask(taskInstance, task); 61 62 unifiedTasks++; 63 templist[i]=task.getId(); 64 62 65 } 63 templist[i]=task.getId();66 64 67 } 65 68 -
trunk/autoquest-plugin-alignment/src/main/java/de/ugoe/cs/autoquest/plugin/alignment/substitution/DifferenceSubstitutionMatrix.java
r1320 r1323 2 2 * 3 3 */ 4 package de.ugoe.cs.autoquest.plugin.alignment ;4 package de.ugoe.cs.autoquest.plugin.alignment.substitution; 5 5 6 6 /** -
trunk/autoquest-plugin-alignment/src/main/java/de/ugoe/cs/autoquest/plugin/alignment/substitution/NearbySubstitutionMatrix.java
r1320 r1323 2 2 * 3 3 */ 4 package de.ugoe.cs.autoquest.plugin.alignment ;4 package de.ugoe.cs.autoquest.plugin.alignment.substitution; 5 5 6 6 /** -
trunk/autoquest-plugin-alignment/src/main/java/de/ugoe/cs/autoquest/plugin/alignment/substitution/SubstitutionMatrix.java
r1320 r1323 1 package de.ugoe.cs.autoquest.plugin.alignment ;1 package de.ugoe.cs.autoquest.plugin.alignment.substitution; 2 2 3 3 public interface SubstitutionMatrix {
Note: See TracChangeset
for help on using the changeset viewer.