question: public static DiscordRecords series2BruteForceDiscords ( double [ ] series , Integer windowSize , int discordCollectionSize , SlidingWindowMarkerAlgorithm marker , double nThreshold ) throws Exception { DiscordRecords discords = new DiscordRecords ( ) ; VisitRegistry globalTrackVisitRegistry = new VisitRegistry ( series . length ) ; globalTrackVisitRegistry . markVisited ( series . length - windowSize , series . length ) ; int discordCounter = 0 ; while ( discords . getSize ( ) < discordCollectionSize ) { LOGGER . debug ( "currently known discords: {} out of {}" , discords . getSize ( ) , discordCollectionSize ) ; Date start = new Date ( ) ; DiscordRecord bestDiscord = findBestDiscordBruteForce ( series , windowSize , globalTrackVisitRegistry , nThreshold ) ; bestDiscord . setPayload ( "#" + discordCounter ) ; Date end = new Date ( ) ; if ( bestDiscord . getNNDistance ( ) == 0.0D || bestDiscord . getPosition ( ) == - 1 ) { LOGGER . debug ( "breaking the outer search loop, discords found: {} last seen discord: {}" + discords . getSize ( ) , bestDiscord ) ; break ; } bestDiscord . setInfo ( "position " + bestDiscord . getPosition ( ) + ", NN distance " + bestDiscord . getNNDistance ( ) + ", elapsed time: " + SAXProcessor . timeToString ( start . getTime ( ) , end . getTime ( ) ) + ", " + bestDiscord . getInfo ( ) ) ; LOGGER . debug ( "{}" , bestDiscord . getInfo ( ) ) ; discords . add ( bestDiscord ) ; marker . markVisited ( globalTrackVisitRegistry , bestDiscord . getPosition ( ) , windowSize ) ; discordCounter ++ ; } return discords ; }
target:  Brute force discord search implementation. BRUTE FORCE algorithm.