LongestCommonSubsequencePositions
LongestCommonSubsequencePositions[s1,s2]
找出字符串、生物分子序列或列表 s1 和 s2 中由相邻元素组成的最长子公共序列,并返回它们在 s1 和 s2 中的位置 {pos1,pos2}.
更多信息和选项
- 对于列表 si,Take[si,posi] 返回最长公共子序列. 对于字符串 si,StringTake[si,posi] 返回相邻最长公共子字符串.
- 如果长度相同的公共子序列不止一个,LongestCommonSubsequencePositions 返回 s1 中位置最靠前的.
- 对于字符串,将选项设为 IgnoreCase->True,LongestCommonSubsequencePositions 会认为不用区分大小写,从而返回 s1 中公共的子序列.
范例
打开所有单元关闭所有单元选项 (1)
IgnoreCase (1)
默认情况下,LongestCommonSubsequencePositions 区分大小写:
属性和关系 (1)
Wolfram Research (2015),LongestCommonSubsequencePositions,Wolfram 语言函数,https://reference.wolfram.com/language/ref/LongestCommonSubsequencePositions.html.
文本
Wolfram Research (2015),LongestCommonSubsequencePositions,Wolfram 语言函数,https://reference.wolfram.com/language/ref/LongestCommonSubsequencePositions.html.
CMS
Wolfram 语言. 2015. "LongestCommonSubsequencePositions." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/LongestCommonSubsequencePositions.html.
APA
Wolfram 语言. (2015). LongestCommonSubsequencePositions. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/LongestCommonSubsequencePositions.html 年