gpt4 book ai didi

algorithm - 序列比较与移动 block 检测

转载 作者:塔克拉玛干 更新时间:2023-11-03 04:51:03 31 4
gpt4 key购买 nike

我需要比较 2 个序列并找到编辑距离。编辑可以包括删除和插入操作(每个符号的修改权重为 1)和 block 移动操作(每个符号的权重为 0.1)
例如:
A B C D E F G H
F G H A B C Y D X E
FGH block 已移至此处。
有没有现有的算法可以有效地解决这个问题?

最佳答案

你可以试试 A technique for isolating differences between files (通过 here ):

An algorithm which uses the 'move' operator is described in P. Heckel's 1978 paper

(对 scribd 界面感到抱歉,但我猜这篇论文还没有经过 OCR。)

关于algorithm - 序列比较与移动 block 检测,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3673747/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com