Ignore:
Timestamp:
08/16/12 12:34:24 (12 years ago)
Author:
sherbold
Message:
  • countless adaptations throughout nearly all components to remove errors introduced due to the refactoring of the event core
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/quest-core-coverage/src/main/java/de/ugoe/cs/quest/coverage/SequenceTools.java

    r518 r547  
    4646         * @return {@link Map} of weights 
    4747         */ 
    48         public static Map<List<? extends Event<?>>, Double> generateWeights( 
     48        public static Map<List<Event>, Double> generateWeights( 
    4949                        IStochasticProcess process, 
    50                         Collection<List<? extends Event<?>>> sequences) { 
    51                 Map<List<? extends Event<?>>, Double> subSeqWeights = new LinkedHashMap<List<? extends Event<?>>, Double>(); 
     50                        Collection<List<Event>> sequences) { 
     51                Map<List<Event>, Double> subSeqWeights = new LinkedHashMap<List<Event>, Double>(); 
    5252                if (sequences != null && !sequences.isEmpty()) { 
    5353                        if (process != null) { 
    5454                                double sum = 0.0; 
    55                                 for (List<? extends Event<?>> sequence : sequences) { 
     55                                for (List<Event> sequence : sequences) { 
    5656                                        double prob = process.getProbability(sequence); 
    5757                                        subSeqWeights.put(sequence, prob); 
     
    5959                                } 
    6060                                if (sum < 1.0) { 
    61                                         for (Map.Entry<List<? extends Event<?>>, Double> entry : subSeqWeights 
     61                                        for (Map.Entry<List<Event>, Double> entry : subSeqWeights 
    6262                                                        .entrySet()) { 
    6363                                                entry.setValue(entry.getValue() / sum); 
     
    6565                                } 
    6666                        } else { 
    67                                 for( List<? extends Event<?>> sequence : sequences ) { 
     67                                for( List<Event> sequence : sequences ) { 
    6868                                        subSeqWeights.put(sequence, 0.0d); 
    6969                                } 
     
    114114         *             thrown if length less or equal to 0 
    115115         */ 
    116         public static Set<List<? extends Event<?>>> containedSubSequences( 
    117                         Collection<List<? extends Event<?>>> sequences, int length) { 
     116        public static Set<List<Event>> containedSubSequences( 
     117                        Collection<List<Event>> sequences, int length) { 
    118118                if (length <= 0) { 
    119119                        throw new InvalidParameterException( 
    120120                                        "length must be a positive integer"); 
    121121                } 
    122                 Set<List<? extends Event<?>>> containedSubSeqs = new LinkedHashSet<List<? extends Event<?>>>(); 
     122                Set<List<Event>> containedSubSeqs = new LinkedHashSet<List<Event>>(); 
    123123                if (sequences != null) { 
    124                         for (List<? extends Event<?>> sequence : sequences) { 
    125                                 List<Event<?>> subSeq = new LinkedList<Event<?>>(); 
     124                        for (List<Event> sequence : sequences) { 
     125                                List<Event> subSeq = new LinkedList<Event>(); 
    126126                                boolean minLengthReached = false; 
    127                                 for (Event<?> event : sequence) { 
     127                                for (Event event : sequence) { 
    128128                                        subSeq.add(event); 
    129129                                        if (!minLengthReached) { 
     
    136136                                        if (minLengthReached) { 
    137137                                                if (!containedSubSeqs.contains(subSeq)) { 
    138                                                         containedSubSeqs.add(new LinkedList<Event<?>>( 
     138                                                        containedSubSeqs.add(new LinkedList<Event>( 
    139139                                                                        subSeq)); 
    140140                                                } 
Note: See TracChangeset for help on using the changeset viewer.