Changeset 1742


Ignore:
Timestamp:
09/12/14 14:30:21 (10 years ago)
Author:
rkrimmel
Message:

Parallel Replacement done

Location:
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/Match.java

    r1741 r1742  
    1313 * The Class Match. 
    1414 */ 
    15 public class Match implements Comparable<Match>,Serializable { 
     15public class Match implements Cloneable,Comparable<Match>,Serializable { 
    1616         
    1717        /** The Constant serialVersionUID. */ 
     
    133133 
    134134        /** 
    135          * Ocurrence id sum. Used for comparing and sorting matches 
     135         * Occurrence id sum. Used for comparing and sorting matches 
    136136         * 
    137          * @return th 
     137         * @return the sum of all occurrence ids. 
    138138         */ 
    139139        public int ocurrenceIDSum() { 
     
    168168        } 
    169169         
     170         
     171         
    170172        /** 
    171173         * Size. 
  • branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/RuleUtils.java

    r1741 r1742  
    5959         * @return the replacement for the range 
    6060         */ 
    61         static ISequenceInstance createNewSubSequenceInRange( 
     61        static synchronized ISequenceInstance createNewSubSequenceInRange( 
    6262                        ITaskInstanceList parent, int startIndex, int endIndex, 
    6363                        ISequence model, ITaskFactory taskFactory, ITaskBuilder taskBuilder) { 
  • branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/SequenceForTaskDetectionRuleAlignment.java

    r1741 r1742  
    7474public class SequenceForTaskDetectionRuleAlignment implements ISessionScopeRule { 
    7575 
    76          
    7776        /** The n threads. */ 
    7877        public static int nThreads = Runtime.getRuntime().availableProcessors() - 1; 
     
    158157                        detectAndReplaceIterations(appData); 
    159158                        appData.getStopWatch().start("task replacement"); 
    160                         //Just does anything if the substitution matrix is created with the option to do so 
     159                        // Just does anything if the substitution matrix is created with the 
     160                        // option to do so 
    161161                        appData.updateSubstitutionMatrix(); 
    162162                        detectAndReplaceTasks(appData); // 
    163163                        appData.getStopWatch().stop("task replacement"); 
    164164                        appData.getStopWatch().stop("whole loop"); 
    165                         //appData.getStopWatch().dumpStatistics(System.out); 
     165                        // appData.getStopWatch().dumpStatistics(System.out); 
    166166                        appData.getStopWatch().reset(); 
    167167 
     
    179179                                        RuleApplicationStatus.FINISHED); 
    180180                } 
    181                 //new TaskTreeValidator().validate(appData.getSessions()); 
     181                // new TaskTreeValidator().validate(appData.getSessions()); 
    182182                return appData.getResult(); 
    183183        } 
     
    257257                Console.traceln(Level.FINE, "Found " + appData.getMatchseqs().size() 
    258258                                + " results"); 
    259  
     259                 
     260                //Nothing found, we can end here 
     261                if(appData.getMatchseqs().size()==0) { 
     262                        appData.detectedAndReplacedTasks=false; 
     263                        return; 
     264                } 
     265                 
    260266                // Searching each match in all other sessions, counting its occurences 
    261267                searchMatchesInAllSessions(appData); 
     
    268274                        public int compare(Match m1, Match m2) { 
    269275                                int cmp = m2.occurenceCount() - m1.occurenceCount(); 
    270                                 if(cmp != 0) { 
     276                                if (cmp != 0) { 
    271277                                        return cmp; 
    272                                 } 
    273                                 else { 
    274                                         cmp = m2.size()-m1.size(); 
    275                                         if(cmp != 0) { 
     278                                } else { 
     279                                        cmp = m2.size() - m1.size(); 
     280                                        if (cmp != 0) { 
    276281                                                return cmp; 
    277                                         } 
    278                                         else { 
    279                                                 //This should rarely happen 
    280                                                 cmp = m2.ocurrenceIDSum()-m1.ocurrenceIDSum(); 
    281                                                 if(cmp !=0) { 
     282                                        } else { 
     283                                                // This should rarely happen 
     284                                                cmp = m2.ocurrenceIDSum() - m1.ocurrenceIDSum(); 
     285                                                if (cmp != 0) { 
    282286                                                        return cmp; 
    283                                                 } 
    284                                                 else { 
    285                                                         cmp = m2.taskIdSum()-m1.taskIdSum(); 
    286                                                          
     287                                                } else { 
     288                                                        cmp = m2.taskIdSum() - m1.taskIdSum(); 
     289 
    287290                                                        return cmp; 
    288291                                                } 
     
    291294                        } 
    292295                }; 
    293                  
     296 
    294297                Collections.sort(appData.getMatchseqs(), comparator); 
    295298                appData.getStopWatch().stop("detecting tasks"); 
    296          
    297  
    298                 // Replace matches in the sessions 
     299 
     300                Console.traceln(Level.INFO, "Preparing replacments"); 
     301                prepareReplacements(appData); 
    299302                Console.traceln(Level.INFO, "Replacing matches in sessions"); 
    300303                appData.getStopWatch().start("replacing tasks"); 
     
    303306        } 
    304307 
    305          
    306         //TODO: DEBUG METHOD 
     308        // TODO: DEBUG METHOD 
    307309        @SuppressWarnings("unused") 
    308310        private void printMatches(RuleApplicationData appData) { 
    309311                LinkedList<Match> matchseqs = appData.getMatchseqs(); 
    310                 if(iteration>1) { 
    311                 System.out.println("PRINTING MATCHES"); 
    312                 for (Iterator<Match> it = matchseqs.iterator(); it.hasNext();) { 
    313                         Match m = it.next(); 
    314                         m.getFirstSequence().printSequence(); 
    315                         m.getSecondSequence().printSequence(); 
    316                         for(Iterator<MatchOccurrence> jt = m.getOccurences().iterator();jt.hasNext();) { 
    317                                 MatchOccurrence mo = jt.next(); 
    318                                 System.out.print(mo.getSequenceId() + " "); 
    319                         } 
    320                         System.out.println(); 
    321                         System.out.println(); 
    322                 } 
    323                 } 
    324         } 
    325  
    326          
     312                if (iteration > 1) { 
     313                        System.out.println("PRINTING MATCHES"); 
     314                        for (Iterator<Match> it = matchseqs.iterator(); it.hasNext();) { 
     315                                Match m = it.next(); 
     316                                m.getFirstSequence().printSequence(); 
     317                                m.getSecondSequence().printSequence(); 
     318                                for (Iterator<MatchOccurrence> jt = m.getOccurences() 
     319                                                .iterator(); jt.hasNext();) { 
     320                                        MatchOccurrence mo = jt.next(); 
     321                                        System.out.print(mo.getSequenceId() + " "); 
     322                                } 
     323                                System.out.println(); 
     324                                System.out.println(); 
     325                        } 
     326                } 
     327        } 
     328 
    327329        /** 
    328330         * <p> 
     
    557559                                                i++; 
    558560                                        } 
    559                                          if ((i == (first.length - 1)) && selectionfound) { 
    560                                          taskBuilder.addChild(subsequence1, appData 
    561                                          .getNumber2Task().get(first[i])); 
    562                                          taskBuilder.addChild(subsequence2, appData 
    563                                          .getNumber2Task().get(second[i])); 
    564                                          } 
     561                                        if ((i == (first.length - 1)) && selectionfound) { 
     562                                                taskBuilder.addChild(subsequence1, appData 
     563                                                                .getNumber2Task().get(first[i])); 
     564                                                taskBuilder.addChild(subsequence2, appData 
     565                                                                .getNumber2Task().get(second[i])); 
     566                                        } 
    565567                                } 
    566568                        } else { 
     
    659661        private void prepareReplacements(RuleApplicationData appData) { 
    660662                appData.initializeQueues(appData.getSessions().size()); 
    661                 final int matchSeqSize = appData.getMatchseqs().size(); 
    662                 int count = 0; 
    663                 for (Iterator<Match> it = appData.getMatchseqs().iterator(); it.hasNext();) { 
     663                 
     664                for (Iterator<Match> it = appData.getMatchseqs().iterator(); it 
     665                                .hasNext();) { 
    664666                        Match m = it.next(); 
    665                         for(Iterator<MatchOccurrence> jt=m.getOccurences().iterator();jt.hasNext();) { 
     667                        for (Iterator<MatchOccurrence> jt = m.getOccurences().iterator(); jt 
     668                                        .hasNext();) { 
    666669                                MatchOccurrence mo = jt.next(); 
    667                                  
     670 
    668671                                Match emptyMatch = null; 
    669672                                try { 
     
    675678                                appData.getPlannedReplacements()[mo.getSequenceId()].add(m); 
    676679                        } 
    677                         count++; 
    678                          
    679                 } 
    680         } 
    681          
     680                } 
     681        } 
     682 
    682683        /** 
    683684         * Replace matches. 
     
    687688         */ 
    688689        private void replaceMatches(RuleApplicationData appData) { 
    689                 appData.setReplacedOccurences(new HashMap<Integer, List<MatchOccurrence>>()); 
    690  
    691                 final int matchSeqSize = appData.getMatchseqs().size(); 
    692                 int count = 0; 
    693                 for (int i = 0; i < matchSeqSize; i++) { 
    694                         count++; 
    695                         // Every pattern consists of 2 sequences, therefore the minimum 
    696                         // occurrences here is 2. 
    697                         // We just need the sequences also occurring in other sequences 
    698                         // as well 
    699                         RuleUtils.printProgressPercentage("Replacement progress", count, matchSeqSize); 
    700                         if (appData.getMatchseqs().get(i).occurenceCount() > 2) { 
    701  
    702                                 final ISequence task = matchAsSequence(appData, appData 
    703                                                 .getMatchseqs().get(i)); 
    704                                 invalidOccurence: for (final Iterator<MatchOccurrence> it = appData 
    705                                                 .getMatchseqs().get(i).getOccurences().iterator(); it 
    706                                                 .hasNext();) { 
    707                                         final MatchOccurrence oc = it.next(); 
    708  
    709                                         // Check if nothing has been replaced in the sequence we 
    710                                         // want to replace now 
    711                                         if (appData.getReplacedOccurrences() 
    712                                                         .get(oc.getSequenceId()) == null) { 
    713                                                 appData.getReplacedOccurrences().put( 
    714                                                                 oc.getSequenceId(), 
    715                                                                 new LinkedList<MatchOccurrence>()); 
    716                                         } else { 
    717                                                 // check if we have any replaced occurence with 
    718                                                 // indexes 
    719                                                 // smaller than ours. If so, we need to adjust 
    720                                                 // our start 
    721                                                 // and endpoints 
    722                                                 // of the replacement. 
    723                                                 // Also do a check if we have replaced this 
    724                                                 // specific 
    725                                                 // MatchOccurence in this sequence already. Jump 
    726                                                 // to the 
    727                                                 // next occurence if this is the case. 
    728                                                 // This is no more neccessary once the matches 
    729                                                 // are 
    730                                                 // harmonized. 
    731  
    732                                                 for (final Iterator<MatchOccurrence> jt = appData 
    733                                                                 .getReplacedOccurrences() 
    734                                                                 .get(oc.getSequenceId()).iterator(); jt 
    735                                                                 .hasNext();) { 
    736                                                         final MatchOccurrence tmpOC = jt.next(); 
    737  
    738                                                         if ((oc.getStartindex() >= tmpOC.getStartindex()) 
    739                                                                         && (oc.getStartindex() <= tmpOC 
    740                                                                                         .getEndindex())) { 
    741                                                                 continue invalidOccurence; 
    742                                                         } 
    743                                                         if (oc.getEndindex() >= tmpOC.getStartindex()) { 
    744                                                                 continue invalidOccurence; 
    745  
    746                                                         } else if (oc.getStartindex() > tmpOC.getEndindex()) { 
    747                                                                 final int diff = tmpOC.getEndindex() 
    748                                                                                 - tmpOC.getStartindex(); 
    749                                                                 // Just to be sure. 
    750                                                                 if (diff > 0) { 
    751                                                                         oc.setStartindex((oc.getStartindex() - diff) + 1); 
    752                                                                         oc.setEndindex((oc.getEndindex() - diff) + 1); 
    753                                                                 } else { 
    754                                                                         Console.traceln(Level.WARNING, 
    755                                                                                         "End index of a Match before start. This should never happen"); 
    756                                                                 } 
    757                                                         } 
    758                                                 } 
    759                                         } 
    760                                         appData.detectedAndReplacedTasks = true; 
    761                                         final ISequenceInstance sequenceInstances = RuleUtils 
    762                                                         .createNewSubSequenceInRange(appData.getSessions() 
    763                                                                         .get(oc.getSequenceId()), oc 
    764                                                                         .getStartindex(), oc.getEndindex(), task, 
    765                                                                         taskFactory, taskBuilder); 
    766                                         oc.setEndindex((oc.getStartindex() + sequenceInstances 
    767                                                         .size()) - RuleUtils.missedOptionals); 
    768  
    769                                         // Adjust the length of the match regarding to the 
    770                                         // length of 
    771                                         // instance. (OptionalInstances may be shorter) 
    772  
    773                                         appData.getReplacedOccurrences().get(oc.getSequenceId()) 
    774                                                         .add(oc); 
    775                                 } 
    776                         } 
     690         
     691                final int numberSeqSize = appData.getNumberSequences().size(); 
     692                Console.traceln(Level.INFO, "replacing matches with " + nThreads + " threads"); 
     693                int newThreads = nThreads; 
     694                if (numberSeqSize < nThreads) { 
     695                        newThreads = numberSeqSize; 
     696                } 
     697                final int interval = numberSeqSize / newThreads; 
     698                int rest = numberSeqSize % newThreads; 
     699                final ExecutorService executor = Executors.newFixedThreadPool(nThreads); 
     700                for (int i = 0; i <= (numberSeqSize - interval); i += interval) { 
     701                        int offset = 0; 
     702                        if (rest != 0) { 
     703                                offset = 1; 
     704                                rest--; 
     705                        } 
     706                        final int from = i; 
     707                        final int to = i + interval + offset - 1; 
     708                        Console.traceln(Level.FINE, 
     709                                        "Match replaceing: Creating thread with matches from " + from 
     710                                                        + " to " + to); 
     711                        // search each match in every other sequence 
     712                        final ParallelMatchReplacer replacer = new ParallelMatchReplacer( 
     713                                        appData, from, to); 
     714                        executor.execute(replacer); 
     715                        i += offset; 
     716                } 
     717                executor.shutdown(); 
     718                try { 
     719                        executor.awaitTermination(2, TimeUnit.HOURS); 
     720                } catch (final InterruptedException e) { 
     721                        e.printStackTrace(); 
    777722                } 
    778723        } 
     
    833778                                rest--; 
    834779                        } 
    835                  
     780 
    836781                        final int from = i; 
    837                         final int to = i + interval+offset-1; 
    838                         Console.traceln(Level.FINER, "Aligning: Creating thread for sessions " + from + " till " + to); 
     782                        final int to = i + interval + offset - 1; 
     783                        Console.traceln(Level.FINER, 
     784                                        "Aligning: Creating thread for sessions " + from + " till " 
     785                                                        + to); 
    839786                        final ParallelPairwiseAligner aligner = new ParallelPairwiseAligner( 
    840787                                        appData, from, to); 
    841788                        executor.execute(aligner); 
    842                         i+=offset; 
     789                        i += offset; 
    843790                } 
    844791                executor.shutdown(); 
     
    850797        } 
    851798 
    852          
    853          
    854          
    855799        /** 
    856800         * Search matches in all sessions. 
     
    860804         */ 
    861805        private void searchMatchesInAllSessions(RuleApplicationData appData) { 
    862                  
     806 
    863807                // Prepare parallel search of matchseqs 
    864808                final int matchSeqSize = appData.getMatchseqs().size(); 
    865                 Console.traceln(Level.INFO, 
    866                                 "searching for patterns ("+ matchSeqSize+") occuring most with " + nThreads 
    867                                                 + " threads"); 
     809                Console.traceln(Level.INFO, "searching for patterns (" + matchSeqSize 
     810                                + ") occuring most with " + nThreads + " threads"); 
    868811                int newThreads = nThreads; 
    869812                if (matchSeqSize < nThreads) { 
     
    874817                final ExecutorService executor = Executors.newFixedThreadPool(nThreads); 
    875818                Console.traceln(Level.FINER, "Interval: " + interval + " Rest: " + rest); 
    876                 for (int i = 0; i <= (matchSeqSize-interval); i += interval) { 
     819                for (int i = 0; i <= (matchSeqSize - interval); i += interval) { 
    877820                        int offset = 0; 
    878821                        if (rest != 0) { 
     
    881824                        } 
    882825                        final int from = i; 
    883                         final int to = i + interval + offset-1; 
    884                         Console.traceln(Level.FINE, "Match finding: Creating thread with matches from " 
    885                                                         + from + " to " + to); 
     826                        final int to = i + interval + offset - 1; 
     827                        Console.traceln(Level.FINE, 
     828                                        "Match finding: Creating thread with matches from " + from 
     829                                                        + " to " + to); 
    886830                        // search each match in every other sequence 
    887831                        final ParallelMatchOcurrencesFinder finder = new ParallelMatchOcurrencesFinder( 
    888832                                        appData, from, to); 
    889833                        executor.execute(finder); 
    890                         i+=offset; 
     834                        i += offset; 
    891835                } 
    892836                executor.shutdown(); 
     
    939883                        this.to = to; 
    940884                } 
     885 
    941886                /* 
    942887                 * (non-Javadoc) 
     
    947892                public void run() { 
    948893                        int count = 0; 
    949                         final int size = to - from; 
     894                        final int size = to + 1 - from; 
    950895 
    951896                        for (int i = from; i <= to; i++) { 
     
    981926                } 
    982927        } 
    983          
    984          
    985928 
    986929        /** 
     
    1022965                public void run() { 
    1023966                        int count = 0; 
    1024                         final int size = to - from;  
     967                        final int size = to +1 - from; 
    1025968 
    1026969                        for (int i = from; i <= to; i++) { 
     
    1044987                } 
    1045988        } 
    1046          
     989 
     990        /** 
     991         * The Class ParallelPairwiseAligner. 
     992         */ 
     993        private class ParallelMatchReplacer implements Runnable { 
     994 
     995                /** The app data. */ 
     996                private final RuleApplicationData appData; 
     997 
     998                /** The from. */ 
     999                private final int from; 
     1000 
     1001                /** The to. */ 
     1002                private final int to; 
     1003 
     1004                /** 
     1005                 * Instantiates a new parallel pairwise aligner. 
     1006                 * 
     1007                 * @param appData 
     1008                 *            the app data 
     1009                 * @param from 
     1010                 *            the from 
     1011                 * @param to 
     1012                 *            the to 
     1013                 */ 
     1014                ParallelMatchReplacer(RuleApplicationData appData, int from, int to) { 
     1015                        this.appData = appData; 
     1016                        this.from = from; 
     1017                        this.to = to; 
     1018                } 
     1019 
     1020                /* 
     1021                 * (non-Javadoc) 
     1022                 *  
     1023                 * @see java.lang.Runnable#run() 
     1024                 */ 
     1025                @Override 
     1026                public void run() { 
     1027                        for (int i = from; i <= to; i++) { 
     1028                                 
     1029                                /* 
     1030                                 * HashMap for keeping track in which sequence which replacement has 
     1031                                 * been performed. Neccessary for updating the indices of other 
     1032                                 * occurrences accordingly 
     1033                                 */ 
     1034                                LinkedList<MatchOccurrence> replacedOccurrences = new LinkedList<MatchOccurrence>(); 
     1035                                invalidOccurence: while (!appData.getPlannedReplacements()[i] 
     1036                                                .isEmpty()) { 
     1037 
     1038                                        Match m = appData.getPlannedReplacements()[i].remove(); 
     1039                                        // Occurrences list has just one child 
     1040                                        MatchOccurrence oc = m.getOccurences().getFirst(); 
     1041                                        // check if we have any replaced occurrence with 
     1042                                        // indexes 
     1043                                        // smaller than ours. If so, we need to adjust 
     1044                                        // our start and end points of the replacement. 
     1045                                        // Also do a check if we have replaced this 
     1046                                        // specific MatchOccurence in this sequence already. 
     1047                                        // Jump to the next occurrence if this is the case. 
     1048                                        // This is no more necessary once the matches 
     1049                                        // are harmonized. 
     1050 
     1051                                        for (final Iterator<MatchOccurrence> jt = replacedOccurrences 
     1052                                                        .iterator(); jt.hasNext();) { 
     1053                                                final MatchOccurrence tmpOC = jt.next(); 
     1054 
     1055                                                if ((oc.getStartindex() >= tmpOC.getStartindex()) 
     1056                                                                && (oc.getStartindex() <= tmpOC.getEndindex())) { 
     1057                                                        continue invalidOccurence; 
     1058                                                } 
     1059                                                if (oc.getEndindex() >= tmpOC.getStartindex()) { 
     1060                                                        continue invalidOccurence; 
     1061 
     1062                                                } else if (oc.getStartindex() > tmpOC.getEndindex()) { 
     1063                                                        final int diff = tmpOC.getEndindex() 
     1064                                                                        - tmpOC.getStartindex(); 
     1065                                                        // Just to be sure. 
     1066                                                        if (diff > 0) { 
     1067                                                                oc.setStartindex((oc.getStartindex() - diff) + 1); 
     1068                                                                oc.setEndindex((oc.getEndindex() - diff) + 1); 
     1069                                                        } else { 
     1070                                                                Console.traceln(Level.WARNING, 
     1071                                                                                "End index of a Match before start. This should never happen"); 
     1072                                                        } 
     1073                                                } 
     1074                                        } 
     1075                                        synchronized (appData) { 
     1076                                                appData.detectedAndReplacedTasks = true; 
     1077                                        } 
     1078                                        final ISequence task = matchAsSequence(appData, m); 
     1079                                        final ISequenceInstance sequenceInstances = RuleUtils 
     1080                                                        .createNewSubSequenceInRange(appData.getSessions() 
     1081                                                                        .get(oc.getSequenceId()), oc 
     1082                                                                        .getStartindex(), oc.getEndindex(), task, 
     1083                                                                        taskFactory, taskBuilder); 
     1084 
     1085                                        // Adjust the length of the match regarding to the 
     1086                                        // length of 
     1087                                        // instance. (OptionalInstances may be shorter) 
     1088                                        oc.setEndindex((oc.getStartindex() + sequenceInstances 
     1089                                                        .size()) - RuleUtils.missedOptionals); 
     1090 
     1091                                        replacedOccurrences.add(oc); 
     1092                                } 
     1093                        } 
     1094                } 
     1095        } 
     1096 
    10471097        /** 
    10481098         * The Class RuleApplicationData. 
     
    10721122                private final ObjectDistanceSubstitionMatrix submat; 
    10731123 
    1074                 /** 
    1075                  * HashMap for keeping track in which sequence which replacement has 
    1076                  * been performed. Neccessary for updating the indices of other 
    1077                  * occurrences accordingly 
    1078                  */ 
    1079                 private HashMap<Integer, List<MatchOccurrence>> replacedOccurences; 
    1080                  
    1081                 private Queue<Match>[] plannedReplacements; 
    1082                  
     1124                private PriorityQueue<Match>[] plannedReplacements; 
    10831125 
    10841126                /** The list of all found matches */ 
     
    11051147                /** Stop Watch to measure performance */ 
    11061148                private final StopWatch stopWatch; 
    1107                  
    1108                  
    11091149 
    11101150                /** 
     
    11251165                        this.detectedAndReplacedTasks = true; 
    11261166                } 
    1127                  
     1167 
    11281168                private void initializeQueues(int size) { 
    1129                         plannedReplacements = new Queue[size]; 
    1130                         for(int i=0;i<size;i++) { 
     1169                        plannedReplacements = new PriorityQueue[size]; 
     1170                        for (int i = 0; i < size; i++) { 
    11311171                                plannedReplacements[i] = new PriorityQueue<Match>(); 
    11321172                        } 
     
    11371177                } 
    11381178 
    1139                 public void setPlannedReplacements(Queue<Match>[] plannedReplacements) { 
    1140                         this.plannedReplacements = plannedReplacements; 
    1141                 } 
    1142  
    11431179                /** 
    11441180                 * Detected and replaced tasks. 
     
    11511187 
    11521188                /** 
    1153                  * Gets the matchseqs. 
    1154                  * 
    1155                  * @return the matchseqs 
     1189                 * Gets the match sequences. 
     1190                 * 
     1191                 * @return the match sequences 
    11561192                 */ 
    11571193                public LinkedList<Match> getMatchseqs() { 
     
    11871223 
    11881224                /** 
    1189                  * Gets the replaced occurrences. 
    1190                  * 
    1191                  * @return the replaced occurences 
    1192                  */ 
    1193                 public HashMap<Integer, List<MatchOccurrence>> getReplacedOccurrences() { 
    1194                         return replacedOccurences; 
    1195                 } 
    1196  
    1197                 /** 
    11981225                 * Gets the result. 
    11991226                 * 
     
    12231250 
    12241251                /** 
    1225                  * Gets the submat. 
    1226                  * 
    1227                  * @return the submat 
     1252                 * Gets the substitution matrix. 
     1253                 * 
     1254                 * @return the substitution matrix 
    12281255                 */ 
    12291256                private ObjectDistanceSubstitionMatrix getSubmat() { 
     
    12441271                 * 
    12451272                 * @param task 
    1246                  *            can be called when new tasks are created to keep track of all newly created tasks 
     1273                 *            can be called when new tasks are created to keep track of 
     1274                 *            all newly created tasks 
    12471275                 */ 
    12481276                private void newTaskCreated(ITask task) { 
     
    12701298 
    12711299                /** 
    1272                  * Sets the replaced occurences. 
    1273                  * 
    1274                  * @param replacedOccurences 
    1275                  *            the replaced occurences 
    1276                  */ 
    1277                 public void setReplacedOccurences( 
    1278                                 HashMap<Integer, List<MatchOccurrence>> replacedOccurences) { 
    1279                         this.replacedOccurences = replacedOccurences; 
    1280                 } 
    1281  
    1282                 /** 
    12831300                 * Update substitution matrix. 
    12841301                 */ 
     
    12901307        } 
    12911308 
    1292          
    1293  
    12941309} 
Note: See TracChangeset for help on using the changeset viewer.