Skip to content

Commit 61da052

Browse files
committed
Update dynamic programming.
1 parent e704f48 commit 61da052

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/main/java/edu/emory/cs/dynamic/lcs/AbstractLCS.java renamed to src/main/java/edu/emory/cs/dynamic/lcs/LCS.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
/**
1919
* @author Jinho D. Choi ({@code jinho.choi@emory.edu})
2020
*/
21-
public abstract class AbstractLCS {
21+
public abstract class LCS {
2222
/**
2323
* @param a the first string.
2424
* @param b the second string.

src/main/java/edu/emory/cs/dynamic/lcs/DLCS.java renamed to src/main/java/edu/emory/cs/dynamic/lcs/LCSDynamic.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
/**
2020
* @author Jinho D. Choi ({@code jinho.choi@emory.edu})
2121
*/
22-
public class DLCS extends AbstractLCS {
22+
public class LCSDynamic extends LCS {
2323
@Override
2424
protected String solve(char[] c, char[] d, int i, int j) {
2525
return solve(c, d, i, j, createTable(c, d));

src/main/java/edu/emory/cs/dynamic/lcs/RLCS.java renamed to src/main/java/edu/emory/cs/dynamic/lcs/LCSRecursive.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
/**
1919
* @author Jinho D. Choi ({@code jinho.choi@emory.edu})
2020
*/
21-
public class RLCS extends AbstractLCS {
21+
public class LCSRecursive extends LCS {
2222
@Override
2323
protected String solve(char[] c, char[] d, int i, int j) {
2424
if (i < 0 || j < 0)

src/test/java/edu/emory/cs/dynamic/LCSTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
*/
1616
package edu.emory.cs.dynamic;
1717

18-
import edu.emory.cs.dynamic.lcs.AbstractLCS;
19-
import edu.emory.cs.dynamic.lcs.DLCS;
20-
import edu.emory.cs.dynamic.lcs.RLCS;
18+
import edu.emory.cs.dynamic.lcs.LCS;
19+
import edu.emory.cs.dynamic.lcs.LCSDynamic;
20+
import edu.emory.cs.dynamic.lcs.LCSRecursive;
2121
import org.junit.Test;
2222

2323
import static org.junit.Assert.assertEquals;
@@ -29,8 +29,8 @@
2929
public class LCSTest {
3030
@Test
3131
public void compare() {
32-
AbstractLCS r = new RLCS();
33-
AbstractLCS d = new DLCS();
32+
LCS r = new LCSRecursive();
33+
LCS d = new LCSDynamic();
3434

3535
String a = "ACGTCGTGT";
3636
String b = "CTAGTGGAG";

0 commit comments

Comments
 (0)