全部书籍

专业

应用 关于 Coach 登录 开始阅读

书籍暂未推出简体中文版——当前显示英文版。

Computer Science · 术语表

什么是 Edit distance, alignment?

又称: edit distance · alignment

Definition 28.5 High School Computer Science · 第 28 章 — Dynamic Programming

The edit distance between two sequences is the smallest number of operations that turn the first into the second, each operation inserting one element, deleting one, or replacing one by another. An alignment of two sequences writes them one above the other, with gaps, so that each column holds two equal elements, two different ones (a replacement), or an element and a gap (an insertion or a deletion).

在原文中阅读 →
Definition 23.4 University Computer Science — Year 1 · 第 23 章 — Dynamic Programming

The edit distance d(a,b)d(a, b) of two words is the smallest number of single-letter insertions, deletions and substitutions that turn aa into bb. An alignment of aa and bb writes them one above the other with gaps (written -), so that no column holds two gaps; its cost is the number of columns whose two entries differ.

The table of , row i for a[:i] and column j for b[:j]. The arrows follow the walk back from D(5, 5) = 2: each step goes to a neighbour that gives the cell its value. The path spells the alignment train- over -rains.
The table of Output 23.2, row ii for a[:i]a[{:}i] and column jj for b[:j]b[{:}j]. The arrows follow the walk back from D(5,5)=2D(5, 5) = 2: each step goes to a neighbour that gives the cell its value. The path spells the alignment train- over -rains.
在原文中阅读 →