Boost logo

Boost :

From: brownell_at_[hidden]
Date: 2001-10-25 13:33:07


I am in the process of writing an algorithm that, when given two
sequences of objects, will compare the differences and, if requested,
output a set of instructions on how to convert sequence #1 to
sequence #2.

For example, if I have the sequence of items:

{ 1, 2, 3, 4, 5, 6 } and
{ 1, 2, 4, 3, 5, 6 }

the algorithm will return information that could be represented as:

{ 1, 2 } == { 1, 2 }
{ 3 } =={ 3 at "index" 3 }
{ 4 } == { 4 at "index" 2 }
{ 5, 6 } == { 5, 6 }

Additionally, instructions to convert sequence #1 to sequence #2,
could be represented as:

In sequence #1, remove 1 item at "index" 2, insert 3 at "index" 3

The most common applications of this algorithm could be file
comparisons or some sort of file versioning system similar to CVS or
SourceSafe, but could even work on more complicated sequences such as
DNA or even a seating chart.

Is there any interest in this algorithm?

Thanks,
David Brownell


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk