package username.genetics; /** * A simple metric. * * @author Gene Geneticist * @author Gena Geneticist * @author Samuel A. Rebelsky * @version 1.0 of April 2006 */ public class SimpleMetric implements CostMetric { /** * The cost for deleting character sc from source. */ public int deleteCost(char sc) { return 1; } // deleteCost(char) /** * The cost for inserting character tc into source. */ public int insertCost(char tc) { return 1; } // insertCost(char) /** * The cost for changing char sc of source to char tc of target. */ public int replaceCost(char sc, char tc) { return 1; } // replaceCost(char, char) } // interface CostMetric