- Timestamp:
- 03/19/12 11:20:20 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDgenerateHybrid.java
r394 r401 106 106 } 107 107 List<? extends Event<?>> seqTmp = seqsTmp.get(index); 108 if ( seqTmp.get(seqTmp.size() - 1) != Event.ENDEVENT) {108 if (!Event.ENDEVENT.equals(seqTmp.get(seqTmp.size() - 1))) { 109 109 List<? extends Event<?>> sequence; 110 110 if (validEnd) { … … 133 133 while (!endFound) { 134 134 sequenceCopy = new LinkedList<Event<?>>(sequence); 135 while (!endFound && sequenceCopy.size() < maxLength) {135 while (!endFound && sequenceCopy.size() <= maxLength) { 136 136 double randVal = r.nextDouble(); 137 137 double probSum = 0.0; … … 139 139 probSum += model.getProbability(sequenceCopy, symbol); 140 140 if (probSum >= randVal) { 141 if (!( symbol == Event.STARTEVENT || symbol == Event.ENDEVENT)) {141 if (!(Event.STARTEVENT.equals(symbol) || Event.ENDEVENT.equals(symbol))) { 142 142 // only add the symbol the sequence if it is not 143 143 // START … … 145 145 sequenceCopy.add(symbol); 146 146 } 147 endFound = (symbol == Event.ENDEVENT)147 endFound = Event.ENDEVENT.equals(symbol) 148 148 || (!validEnd && sequenceCopy.size() == maxLength); 149 149 break;
Note: See TracChangeset
for help on using the changeset viewer.