Skip to content

Commit

Permalink
rename class, resolves todo
Browse files Browse the repository at this point in the history
  • Loading branch information
TilmanNeumann committed Dec 31, 2024
1 parent cad021d commit 51afa88
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,13 @@

import java.util.TreeSet;

import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;

/**
* Methods to generate quadratic residues or test for quadratic residuosity for general moduli m.
*
* @author Tilman Neumann
*/
public class QuadraticResidues {

@SuppressWarnings("unused")
private static final Logger LOG = LogManager.getLogger(QuadraticResidues.class);

@SuppressWarnings("unused")
private static final boolean DEBUG = false;

/**
* Return all quadratic residues modulo m, computed by brute force.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
import de.tilman_neumann.util.ConfigUtil;

/**
* Test quadratic residue computations modulo 2^n.
* Tests for class QuadraticResidues.
*
* @author Tilman Neumann
*/
public class QuadraticResiduesMod2PowNTest {
public class QuadraticResiduesTest {

private static final Logger LOG = LogManager.getLogger(QuadraticResiduesMod2PowNTest.class);
private static final Logger LOG = LogManager.getLogger(QuadraticResiduesTest.class);

private static final boolean DEBUG = false;

Expand All @@ -42,7 +42,6 @@ public static void setup() {
}

@Test
// TODO this test must be moved to another class because m=100 is not of the form 2^n
public void testSetOfQuadraticResidues() {
TreeSet<Long> quadraticResiduesMod100 = QuadraticResidues.getQuadraticResidues(100);
LOG.info("m = 100 has " + quadraticResiduesMod100.size() + " quadratic residues: " + quadraticResiduesMod100);
Expand All @@ -56,7 +55,7 @@ public void testSetOfQuadraticResidues() {
* 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.
*/
@Test
public void testQuadraticResidueCounts() {
public void testQuadraticResiduesMod2PowNCounts() {
ArrayList<Integer> counts = new ArrayList<Integer>();
ArrayList<Integer> evenCounts = new ArrayList<Integer>();

Expand Down

0 comments on commit 51afa88

Please sign in to comment.