public class Distance extends Object
| Constructor and Description | 
|---|
| Distance() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected static int | countTrue(boolean[] in) | 
| static int | findSmallest(int[] x,
            int[] y)Find smallest difference between two elements of two arrays | 
| static int | noTimes(int[][] blocksForEachTerm,
       int windowSize,
       int documentLengthInTokens)Counts number of blocks where all given terms occur within a block of windowSize in length, in a document of length documentLengthInTokens
 where the blocks for the terms are as given | 
| static int | noTimes(int[] blocksOfTerm1,
       int[] blocksOfTerm2,
       int windowSize,
       int documentLengthInTokens)Counts number of blocks where two terms occur within a block of windowSize in length, in a document of length documentLengthInTokens
 where the blocks for the terms are as given | 
| static int | noTimes(int[] blocksOfTerm1,
       int start1,
       int end1,
       int[] blocksOfTerm2,
       int start2,
       int end2,
       int windowSize,
       int documentLengthInTokens)Counts number of blocks where two terms occur within a block of windowSize in length, in a document of length documentLengthInTokens
 where the blocks for the terms are as given | 
| static int | noTimesNEW(int[] term0Positions,
          int[] term1Positions,
          int windowSize,
          int documentLengthInTokens)Returns the number of windows that have the both terms occurring, in the order specified. | 
| static int | noTimesSameOrder(int[][] blocksOfAllTerms1,
                int documentLengthInTokens)Deprecated.  | 
| static int | noTimesSameOrder(int[] term0Positions,
                int[] term1Positions,
                int windowSize,
                int documentLengthInTokens) | 
| static int | noTimesSameOrder(int[] posTerm1,
                int start1,
                int end1,
                int[] posTerm2,
                int start2,
                int end2,
                int windowSize,
                int documentLength) | 
| static int | noTimesSameOrderOLD(int[] blocksOfTerm1,
                   int[] blocksofTerm2,
                   int windowSize,
                   int documentLengthInTokens)number of blocks where | 
| static void | windowsForTerms(int[] blocksOfTerm,
               int windowSize,
               int numberOfNGrams,
               int[] windows_for_term)Sets the number of occurrences of a term in each window, given the specified window size, the number of n-grams in the document,
 and the blocks of the term. | 
| static void | windowsForTerms(int[] blocksOfTerm,
               int start,
               int end,
               int windowSize,
               int numberOfNGrams,
               int[] windows_for_term)Sets the number of occurrences of a term in each window, given the specified window size, the number of n-grams in the document,
 and the blocks of the term. | 
public static final int noTimes(int[] blocksOfTerm1,
          int start1,
          int end1,
          int[] blocksOfTerm2,
          int start2,
          int end2,
          int windowSize,
          int documentLengthInTokens)
blocksOfTerm1 - start1 - The start index for the correct blockIds in blocksOfTerm1end1 - The end for the correct blockIds in blocksOfTerm1blocksOfTerm2 - start2 - The start index for the correct blockIds in blocksOfTerm2end2 - The end index for the correct blockIds in blocksOfTerm2windowSize - documentLengthInTokens - public static final int noTimes(int[] blocksOfTerm1,
          int[] blocksOfTerm2,
          int windowSize,
          int documentLengthInTokens)
blocksOfTerm1 - blocksOfTerm2 - windowSize - documentLengthInTokens - public static final int noTimes(int[][] blocksForEachTerm,
          int windowSize,
          int documentLengthInTokens)
blocksForEachTerm - - array of int[] of blocks for each termwindowSize - documentLengthInTokens - public static final void windowsForTerms(int[] blocksOfTerm,
                   int start,
                   int end,
                   int windowSize,
                   int numberOfNGrams,
                   int[] windows_for_term)
blocksOfTerm - - block occurrences for termstart - - start index to consider in blocksOfTermend - - end index to consider in blocksOfTermwindowSize - - size of each windownumberOfNGrams - - number of windows in documentwindows_for_term - - array of length numberOfNGramspublic static final void windowsForTerms(int[] blocksOfTerm,
                   int windowSize,
                   int numberOfNGrams,
                   int[] windows_for_term)
blocksOfTerm - - block occurrences for termwindowSize - - size of each windownumberOfNGrams - - number of windows in documentwindows_for_term - - array of length numberOfNGramspublic static final int noTimesSameOrder(int[] term0Positions,
                   int[] term1Positions,
                   int windowSize,
                   int documentLengthInTokens)
public static final int noTimesSameOrder(int[] posTerm1,
                   int start1,
                   int end1,
                   int[] posTerm2,
                   int start2,
                   int end2,
                   int windowSize,
                   int documentLength)
public static final int noTimesNEW(int[] term0Positions,
             int[] term1Positions,
             int windowSize,
             int documentLengthInTokens)
protected static final int countTrue(boolean[] in)
@Deprecated public static final int noTimesSameOrder(int[][] blocksOfAllTerms1, int documentLengthInTokens)
public static final int noTimesSameOrderOLD(int[] blocksOfTerm1,
                      int[] blocksofTerm2,
                      int windowSize,
                      int documentLengthInTokens)
public static final int findSmallest(int[] x,
               int[] y)
Terrier 4.0. Copyright © 2004-2014 University of Glasgow