Skip to content

A Hirschberg's LCS based linear space diffing implementation.

License

Notifications You must be signed in to change notification settings

noogen-projects/ng-diff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ng-diff

A Hirschberg's LCS-based diffing implementation, working in quadratic time and in linear space.

For example:

use ng_diff::{AsCharsIter, Hirschberg, HirschbergAlg};

fn main() {
    let diff: Vec<_> = Hirschberg::diff("abcdfghjqvz".chars_iter(), "abcdefgijkrxyz".chars_iter());
    for item in diff {
        print!("{} ", item);
    }
    println!();
}

will print:

a b c d + e f g - h + i j - q - v + k + r + x + y z 

Other examples are in the examples directory.

About

A Hirschberg's LCS based linear space diffing implementation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages