Skip to content

Latest commit

 

History

History
34 lines (21 loc) · 668 Bytes

README.md

File metadata and controls

34 lines (21 loc) · 668 Bytes

Subsequences.jl

A Julia package for finding longest common and longest contiguous subsequences

Build Status

Quickstart

julia> Pkg.add("Subsequences")

julia> using Subsequences

julia> a = "abc-abc----"; b = "___ab_c__abc";

julia> seq, a_range, b_range = longest_common_subsequence(a, b)
("abcabc",1:7,4:12)

julia> a[a_range]
"abc-abc"

julia> b[b_range]
"ab_c__abc"

julia> seq, a_range, b_range = longest_contiguous_subsequence(a, b)
("abc",1:3,10:12)

julia> a[a_range]
"abc"

julia> b[b_range]
"abc"