Skip navigation links
com.google.gwt.dev.util.editdistance

Class PatternBitmap

Package class diagram package PatternBitmap
    • Method Detail

      • map

        public static int[] map(CharSequence s,
                                CharIndex idx,
                                int[] result)
        Computes a pattern bitmap for a short character sequence. For each character in the alphabet (represented by a CharIndex), bits are set where that character appears in the sequence. For this generator, the pattern must fit in an "int": the character sequence must not be longer than Integer.SIZE.
        Parameters:
        s - the character sequence defining the bits to be set
        idx - the alphabet for which bitmaps should be produced
        result - an array (of size idx.size() or greater) to hold the resulting bitmaps
        Returns:
        the result array passed as a parameter, for convenience
      • map

        public static int[][] map(CharSequence s,
                                  CharIndex idx,
                                  int[][] result,
                                  int width)
        Computes a pattern bitmap for a character sequence of any length. For each character in the alphabet (represented by a CharIndex), bits are set where that character appears in the sequence. Each (per-character) bitmap is represented by an "int[]".
        Parameters:
        s - the character sequence defining the bits to be set
        idx - the alphabet for which bitmaps should be produced
        result - an array (of size idx.size() or greater) to hold the resulting bitmaps
        width - how many bits to be use in each word, no more than Integer.SIZE
        Returns:
        the result array passed as a parameter, for convenience
      • map

        public static long[] map(CharSequence s,
                                 CharIndex idx,
                                 long[] result)
        Computes a pattern bitmap for a medium character sequence. For each character in the alphabet (represented by a CharIndex), bits are set where that character appears in the sequence. For this generator, the pattern must fit in a "long": the character sequence must not be longer than Long.SIZE.
        Parameters:
        s - the character sequence defining the bits to be set
        idx - the alphabet for which bitmaps should be produced
        result - an array (of size idx.size() or greater) to hold the resulting bitmaps
        Returns:
        the result array passed as a parameter, for convenience

Copyright © 2018. All rights reserved.