11/*
22 * JavaPermutationTools: A Java library for computation on permutations and sequences
3- * Copyright 2005-2022 Vincent A. Cicirello, <https://www.cicirello.org/>.
3+ * Copyright 2005-2023 Vincent A. Cicirello, <https://www.cicirello.org/>.
44 *
55 * This file is part of JavaPermutationTools (https://jpt.cicirello.org/).
66 *
2929 *
3030 * <p>Edit distance is the minimum cost to transform one string (or sequence) into the other, which
3131 * is the sum of the costs of the edit operations necessary to do so. This edit distance considers 3
32- * edit operations: Inserts which insert a new element into the sequence, Deletes which remove an
32+ * edit operations: Inserts which inserts a new element into the sequence, Deletes which removes an
3333 * element from the sequence, and Changes which replace an element with a different element.
3434 *
35- * <p>The edit distance is parameterized by costs for the edit operations. We provide two
36- * constructors which enable you to specify 3 costs, 1 for each type of edit operation. One of the
37- * constructors expects integer costs, and the other double valued costs. If you specify costs as
38- * integers, then all of the distance and distancef methods from the {@link
39- * org.cicirello.sequences.distance.SequenceDistanceMeasurer SequenceDistanceMeasurer} and {@link
40- * org.cicirello.sequences.distance.SequenceDistanceMeasurerDouble SequenceDistanceMeasurerDouble}
41- * interfaces are available. If costs are specified as doubles, then only the distancef methods will
42- * function, while the distance methods will throw exceptions.
35+ * <p>The edit distance is parameterized by costs for the edit operations. The class provides a
36+ * constructor which enables you to specify 3 costs as ints, 1 for each type of edit operation. If
37+ * your application requires non-integer costs, then use the {@link EditDistanceDouble} class which
38+ * defines the costs as doubles, but is otherwise an implementation of the same algorithm.
4339 *
4440 * <p>This class supports computing EditDistance for Java String objects or arrays of any of the
4541 * primitive types, or arrays of objects. It makes no assumptions about the contents of the Strings
@@ -80,7 +76,9 @@ public class EditDistance extends EditDistanceDouble implements SequenceDistance
8076 * @param deleteCost Cost of an deletion operation. Must be non-negative.
8177 * @param changeCost Cost of an change operation. Must be non-negative.
8278 * @throws IllegalArgumentException if any of the costs are negative.
79+ * @deprecated For double-valued costs, use the {@link EditDistanceDouble} class instead.
8380 */
81+ @ Deprecated
8482 public EditDistance (double insertCost , double deleteCost , double changeCost ) {
8583 super (insertCost , deleteCost , changeCost );
8684 if (isIntAsDouble (insertCost ) && isIntAsDouble (deleteCost ) && isIntAsDouble (changeCost )) {
@@ -95,8 +93,7 @@ public EditDistance(double insertCost, double deleteCost, double changeCost) {
9593 }
9694
9795 /**
98- * Constructs an edit distance measure with the specified edit operation costs. With integer
99- * costs, all of the distance and distancef methods are available.
96+ * Constructs an edit distance measure with the specified edit operation costs.
10097 *
10198 * @param insertCost Cost of an insertion operation. Must be non-negative.
10299 * @param deleteCost Cost of an deletion operation. Must be non-negative.
0 commit comments