Convert figure images to markdown

This commit is contained in:
James Gregory 2013-12-31 07:56:10 +11:00
commit 77a95ec319
115 changed files with 218 additions and 403 deletions

View file

@ -83,8 +83,7 @@ advance of fewer bytes than the pattern length, and potentially as
little as the same single byte distance by which the standard search
approach advances.
![](images/14-01.jpg)\
**Figure 14.1**  *Mismatch on first character checked.*
![**Figure 14.1**  *Mismatch on first character checked.*](images/14-01.jpg)
What if the mismatch occurs with a buffer character that *does* occur in
the pattern? Then we can't skip past the mismatch location, but we can
@ -104,8 +103,7 @@ move clear past the mismatch location. Otherwise, the pattern moves
until a matching pattern byte lies atop the mismatch. That's all there
is to it!
![](images/14-02.jpg)\
**Figure 14.2**  *Mismatch on third character checked.*
![**Figure 14.2**  *Mismatch on third character checked.*](images/14-02.jpg)
### Boyer-Moore: The Good and the Bad {#Heading5}
@ -119,8 +117,7 @@ skips, help Boyer-Moore, as does a long distance to the match location,
which helps diffuse the overhead of building the table of distances to
skip ahead on all the possible mismatch values.
![](images/14-03.jpg)\
**Figure 14.3**  *Mismatch on character that appears in pattern.*
![**Figure 14.3**  *Mismatch on character that appears in pattern.*](images/14-03.jpg)
The best case for Boyer-Moore is good indeed: About N/M comparisons are
required, where N is the buffer length and M is the pattern length. This