pub struct Myers<T = u64>where
    T: BitVec,
{ /* private fields */ }
Expand description

Myers algorithm.

Implementations

Create a new instance of Myers algorithm for a given pattern.

Calculate the global distance of the pattern to the given text.

Finds all matches of pattern in the given text up to a given maximum distance. Matches are returned as an iterator over pairs of end position and distance.

Find the best match of the pattern in the given text. if multiple end positions have the same distance, the first is returned.

Finds all matches of pattern in the given text up to a given maximum distance. In contrast to find_all_end, matches are returned as an iterator over ranges of (start, end, distance). Note that the end coordinate is not included in the range and thus and thus greater by one compared to the end index returned by find_all_end().

As find_all_end, this function returns an iterator over tuples of (end, distance). Additionally, it keeps the data necessary for later obtaining the starting positions and/or the alignment path at any position that was already searched.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.