Skip to content

Commit 51afa88

Browse files
committed
rename class, resolves todo
1 parent cad021d commit 51afa88

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

src/main/java/de/tilman_neumann/jml/quadraticResidues/QuadraticResidues.java

-9
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,13 @@
1515

1616
import java.util.TreeSet;
1717

18-
import org.apache.logging.log4j.Logger;
19-
import org.apache.logging.log4j.LogManager;
20-
2118
/**
2219
* Methods to generate quadratic residues or test for quadratic residuosity for general moduli m.
2320
*
2421
* @author Tilman Neumann
2522
*/
2623
public class QuadraticResidues {
2724

28-
@SuppressWarnings("unused")
29-
private static final Logger LOG = LogManager.getLogger(QuadraticResidues.class);
30-
31-
@SuppressWarnings("unused")
32-
private static final boolean DEBUG = false;
33-
3425
/**
3526
* Return all quadratic residues modulo m, computed by brute force.
3627
*

src/test/java/de/tilman_neumann/jml/quadraticResidues/QuadraticResiduesMod2PowNTest.java src/test/java/de/tilman_neumann/jml/quadraticResidues/QuadraticResiduesTest.java

+4-5
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@
2626
import de.tilman_neumann.util.ConfigUtil;
2727

2828
/**
29-
* Test quadratic residue computations modulo 2^n.
29+
* Tests for class QuadraticResidues.
3030
*
3131
* @author Tilman Neumann
3232
*/
33-
public class QuadraticResiduesMod2PowNTest {
33+
public class QuadraticResiduesTest {
3434

35-
private static final Logger LOG = LogManager.getLogger(QuadraticResiduesMod2PowNTest.class);
35+
private static final Logger LOG = LogManager.getLogger(QuadraticResiduesTest.class);
3636

3737
private static final boolean DEBUG = false;
3838

@@ -42,7 +42,6 @@ public static void setup() {
4242
}
4343

4444
@Test
45-
// TODO this test must be moved to another class because m=100 is not of the form 2^n
4645
public void testSetOfQuadraticResidues() {
4746
TreeSet<Long> quadraticResiduesMod100 = QuadraticResidues.getQuadraticResidues(100);
4847
LOG.info("m = 100 has " + quadraticResiduesMod100.size() + " quadratic residues: " + quadraticResiduesMod100);
@@ -56,7 +55,7 @@ public void testSetOfQuadraticResidues() {
5655
* a(n) = {1, 1} + A023105(n-2) = 1, 1, 1, 2, 2, 3, 4, 7, 12, 23, 44, 87, 172, 343, 684, 1367, 2732, 5463, 10924, 21847, ... for "even" quadratic residues modulo 2^n.
5756
*/
5857
@Test
59-
public void testQuadraticResidueCounts() {
58+
public void testQuadraticResiduesMod2PowNCounts() {
6059
ArrayList<Integer> counts = new ArrayList<Integer>();
6160
ArrayList<Integer> evenCounts = new ArrayList<Integer>();
6261

0 commit comments

Comments
 (0)