Changeset 400 for trunk/EventBenchCore
- Timestamp:
- 03/19/12 10:57:34 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/EventBenchCore/src/de/ugoe/cs/eventbench/models/TrieBasedModel.java
r391 r400 163 163 context.add(Event.STARTEVENT); 164 164 165 while (!endFound && sequence.size() < maxLength) {165 while (!endFound && sequence.size() <= maxLength) { 166 166 double randVal = r.nextDouble(); 167 167 double probSum = 0.0; … … 170 170 probSum += getProbability(currentContext, symbol); 171 171 if (probSum >= randVal) { 172 if (!(symbol == Event.STARTEVENT || symbol == Event.ENDEVENT)) { 172 if (!(Event.STARTEVENT.equals(symbol) || Event.ENDEVENT 173 .equals(symbol))) { 173 174 // only add the symbol the sequence if it is not 174 175 // START or END … … 176 177 sequence.add(symbol); 177 178 } 178 endFound = ( symbol == Event.ENDEVENT)179 endFound = (Event.ENDEVENT.equals(symbol)) 179 180 || (!validEnd && sequence.size() == maxLength); 180 181 break;
Note: See TracChangeset
for help on using the changeset viewer.