Changeset 391


Ignore:
Timestamp:
03/08/12 09:11:15 (12 years ago)
Author:
sherbold
Message:
  • modified de.ugoe.cs.eventbench.data.Event.equals(Object) such that targetEquals is always called, if the other object can equal the Event object. This simplifies pre-computing the equalities of de.ugoe.cs.eventbench.jfc.data.JFCEvents (project EventBenchConsole?) significantly.
  • minor optimization of de.ugoe.cs.eventbench.models.TrieBasedModel?.randomSequence(int, boolean). Removed obsolete variable currentState.
Location:
trunk/EventBenchCore/src/de/ugoe/cs/eventbench
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/EventBenchCore/src/de/ugoe/cs/eventbench/data/Event.java

    r375 r391  
    9898                        if (otherEvent.canEqual(this)) { 
    9999                                if (type != null) { 
    100                                         return type.equals(otherEvent.type) 
    101                                                         && targetEquals(otherEvent.target); 
     100                                        return targetEquals(otherEvent.target) 
     101                                                        && type.equals(otherEvent.type); 
    102102                                } else { 
    103                                         return otherEvent.type == null 
    104                                                         && targetEquals(otherEvent.target); 
     103                                        return targetEquals(otherEvent.target) 
     104                                                        && otherEvent.type == null; 
    105105                                } 
    106106                        } else { 
  • trunk/EventBenchCore/src/de/ugoe/cs/eventbench/models/TrieBasedModel.java

    r386 r391  
    163163                                context.add(Event.STARTEVENT); 
    164164 
    165                                 Event<?> currentState = Event.STARTEVENT; 
    166  
    167165                                while (!endFound && sequence.size() < maxLength) { 
    168166                                        double randVal = r.nextDouble(); 
     
    176174                                                                // START or END 
    177175                                                                context.add(symbol); 
    178                                                                 currentState = symbol; 
    179                                                                 sequence.add(currentState); 
     176                                                                sequence.add(symbol); 
    180177                                                        } 
    181178                                                        endFound = (symbol == Event.ENDEVENT) 
Note: See TracChangeset for help on using the changeset viewer.