public class LCS extends Object
Modifier and Type | Class and Description |
---|---|
static class |
LCS.Change<T>
Elemental change in an array of values.
|
static class |
LCS.ChangeType |
Modifier and Type | Method and Description |
---|---|
static <T> List<LCS.Change<T>> |
getChangeSet(T[] a,
T[] b)
Constructs the minimal changeset to turn the first array into the second one.
|
static <T> List<T> |
getLongestCommonSubsequence(T[] a,
T[] b)
Find the longest common subsequence between arrays a and b.
|
static <T extends Serializable> |
getSerializableChangeSet(T[] a,
T[] b)
Constructs the minimal changeset to turn the first array into the second one.
|
public static <T extends Serializable> List<LCS.Change<T>> getSerializableChangeSet(T[] a, T[] b)
T
- the type of the array elementsa
- the first arrayb
- the second arraypublic static <T> List<LCS.Change<T>> getChangeSet(T[] a, T[] b)
T
- the type of the array elementsa
- the first arrayb
- the second arraypublic static <T> List<T> getLongestCommonSubsequence(T[] a, T[] b)
The execution time and memory usage are linear for typical inputs, but will be quadratic in the worst case.
Copyright © 2007–2016 Hippo B.V. (http://www.onehippo.com). All rights reserved.