Diff

object Diff
Companion
class
class Object
trait Matchable
class Any

Type members

Classlikes

sealed trait Bimap

Allow for mapping indices bidirectionally between the base and target sequences.

Allow for mapping indices bidirectionally between the base and target sequences.

sealed trait Chunk[T]

Alternative representation of the diffing output.

Alternative representation of the diffing output.

Companion
object
object Chunk
Companion
class
trait Eq[T]

Very simple equality type class, which allows for customizing the comparison logic employed by the diff algorith. By default universal value equality is used.

Very simple equality type class, which allows for customizing the comparison logic employed by the diff algorith. By default universal value equality is used.

Companion
object
object Eq
Companion
class
sealed trait Op

An ADT for all "operations" the diff algorithm can derive.

An ADT for all "operations" the diff algorithm can derive.

Companion
object
object Op
Companion
class
final class Slice[T](val underlying: IndexedSeq[T], _from: Int, _until: Int) extends Slice[T]

An IndexedSeqView.Slice that surfaces the underlying sequence as well as the index range.

An IndexedSeqView.Slice that surfaces the underlying sequence as well as the index range.

Companion
object
object Slice
Companion
class

Value members

Concrete methods

def apply[T](base: IndexedSeq[T], target: IndexedSeq[T])(`evidence$1`: Eq[T]): Diff[T]

Runs a relatively efficient, stacksafe, linear space implementation of the Myers diff algorithm and returns the result as a Diff instance, which serves as the tee-off point for further, downstream logic.

Runs a relatively efficient, stacksafe, linear space implementation of the Myers diff algorithm and returns the result as a Diff instance, which serves as the tee-off point for further, downstream logic.

The core algorithm is based on the work of Robert Elder.

See also
def longestCommonSubsequence[T](base: IndexedSeq[T], target: IndexedSeq[T])(`evidence$2`: Eq[T], `evidence$3`: ClassTag[T]): ArraySeq[T]

Returns a longest common subsequence of the base and target sequences. or None, if the two sequences have no elements in common. Stacksafe and reasonably efficient.

Returns a longest common subsequence of the base and target sequences. or None, if the two sequences have no elements in common. Stacksafe and reasonably efficient.

def minEditDistance[T](base: IndexedSeq[T], target: IndexedSeq[T])(eq: Eq[T]): Int

Returns the minimum number of edits required to transform base and target, whereby one "edit" corresponds to deleting or inserting one single element.

Returns the minimum number of edits required to transform base and target, whereby one "edit" corresponds to deleting or inserting one single element.

Equal to Diff(base, target).delInsOps.size but more efficient.