- Timestamp:
- 07/04/11 11:40:25 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/EventBenchCore/src/de/ugoe/cs/eventbench/models/TrieBasedModel.java
r94 r95 151 151 List<Event<?>> subSeq = new LinkedList<Event<?>>(); 152 152 subSeq.add(Event.STARTEVENT); 153 sequenceSet.add(subSeq); 153 154 } else { 154 155 for( Event<?> event : getEvents() ) { … … 161 162 } 162 163 Set<? extends Event<?>> events = getEvents(); 163 Set<List<? extends Event<?>>> seqsShorter = generateSequences(length-1 );164 Set<List<? extends Event<?>>> seqsShorter = generateSequences(length-1, fromStart); 164 165 for( Event<?> event : events ) { 165 166 for( List<? extends Event<?>> seqShorter : seqsShorter ) { … … 178 179 public Set<List<? extends Event<?>>> generateValidSequences(int length) { 179 180 // check for min-length implicitly done by generateSequences 180 Set<List<? extends Event<?>>> validSequences = generateSequences(length, true); 181 for( List<? extends Event<?>> sequence : validSequences ) { 182 if( sequence.size()!=length ) { 183 validSequences.remove(sequence); 184 } else { 185 if( !Event.ENDEVENT.equals(sequence.get(sequence.size()-1)) ) { 186 validSequences.remove(sequence); 187 } 181 Set<List<? extends Event<?>>> allSequences = generateSequences(length, true); 182 Set<List<? extends Event<?>>> validSequences = new LinkedHashSet<List<? extends Event<?>>>(); 183 for( List<? extends Event<?>> sequence : allSequences ) { 184 if( sequence.size()==length && Event.ENDEVENT.equals(sequence.get(sequence.size()-1)) ) { 185 validSequences.add(sequence); 188 186 } 189 187 }
Note: See TracChangeset
for help on using the changeset viewer.