Skip to content

Commit ff12488

Browse files
committed
document source of computation of max
1 parent d3da10d commit ff12488

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/org/cicirello/permutations/distance/ReversalDistance.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ public int distance(Permutation p1, Permutation p2) {
129129
@Override
130130
public int max(int length) {
131131
if (length > 1) {
132+
// Source: Bafna, V.; Pevzner, P.A. Genome Rearrangements and Sorting
133+
// by Reversals. SIAM Journal on Computing 1996, 25, 272–289. 570
134+
// doi:10.1137/S0097539793250627.
132135
return length - 1;
133136
} else {
134137
return 0;

0 commit comments

Comments
 (0)