private MyersDiff(EditList edits, HashedSequenceComparator<S> cmp, HashedSequence<S> a, HashedSequence<S> b, Edit region) { this.edits = edits; this.cmp = cmp; this.a = a; this.b = b; calculateEdits(region); }
/** * Entrypoint into the algorithm this class is all about. This method triggers that the * differences between A and B are calculated in form of a list of edits. * @param r portion of the sequences to examine. */ private void calculateEdits(Edit r) { middle.initialize(r.beginA, r.endA, r.beginB, r.endB); if (middle.beginA >= middle.endA && middle.beginB >= middle.endB) return; calculateEdits(middle.beginA, middle.endA, middle.beginB, middle.endB); }
int k = edit.beginB - edit.beginA; int x = middle.backward.snake(k, edit.beginA); calculateEdits(beginA, x, beginB, k + x); int k = edit.endB - edit.endA; int x = middle.forward.snake(k, edit.endA); calculateEdits(x, endA, k + x, endB);
private MyersDiff(EditList edits, HashedSequenceComparator<S> cmp, HashedSequence<S> a, HashedSequence<S> b, Edit region) { this.edits = edits; this.cmp = cmp; this.a = a; this.b = b; calculateEdits(region); }
private MyersDiff(EditList edits, HashedSequenceComparator<S> cmp, HashedSequence<S> a, HashedSequence<S> b, Edit region) { this.edits = edits; this.cmp = cmp; this.a = a; this.b = b; calculateEdits(region); }
/** * Entrypoint into the algorithm this class is all about. This method triggers that the * differences between A and B are calculated in form of a list of edits. * @param r portion of the sequences to examine. */ private void calculateEdits(Edit r) { middle.initialize(r.beginA, r.endA, r.beginB, r.endB); if (middle.beginA >= middle.endA && middle.beginB >= middle.endB) return; calculateEdits(middle.beginA, middle.endA, middle.beginB, middle.endB); }
/** * Entrypoint into the algorithm this class is all about. This method triggers that the * differences between A and B are calculated in form of a list of edits. * @param r portion of the sequences to examine. */ private void calculateEdits(Edit r) { middle.initialize(r.beginA, r.endA, r.beginB, r.endB); if (middle.beginA >= middle.endA && middle.beginB >= middle.endB) return; calculateEdits(middle.beginA, middle.endA, middle.beginB, middle.endB); }
int k = edit.beginB - edit.beginA; int x = middle.backward.snake(k, edit.beginA); calculateEdits(beginA, x, beginB, k + x); int k = edit.endB - edit.endA; int x = middle.forward.snake(k, edit.endA); calculateEdits(x, endA, k + x, endB);
int k = edit.beginB - edit.beginA; int x = middle.backward.snake(k, edit.beginA); calculateEdits(beginA, x, beginB, k + x); int k = edit.endB - edit.endA; int x = middle.forward.snake(k, edit.endA); calculateEdits(x, endA, k + x, endB);