Bitap class

The bitap algorithm (also known as the shift-or, shift-and or Baeza-Yates–Gonnet algorithm) is an approximate string matching algorithm. The algorithm tells whether a given text contains a substring which is "approximately equal" to a given pattern, where approximate equality is defined in terms of Levenshtein distance – if the substring and pattern are within a given distance k of each other, then the algorithm considers them equal. The algorithm begins by precomputing a set of bitmasks containing one bit for each element of the pattern. Then it is able to do most of the work with bitwise operations, which are extremely fast.

Constructors

Bitap(String pattern, {required FuzzyOptions options})
Instantiates a bitap, given options

Properties

hashCode int
The hash code for this object.
no setterinherited
options FuzzyOptions
Configuration options
final
pattern String
The pattern to search for
getter/setter pair
patternAlphabet Map<String, int>
The laphabet derived from the pattern
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
Executes a search, given a search string
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited