/** * Returns a prime number which is <code>>= desiredCapacity</code> and * very close to <code>desiredCapacity</code> (within 11% if * <code>desiredCapacity >= 1000</code>). * * @param desiredCapacity * the capacity desired by the user. * @return the capacity which should be used for a hashtable. */ protected int nextPrime(int desiredCapacity) { return PrimeFinder.nextPrime(desiredCapacity); }
/** * Tests correctness. Try * from=1000, to=10000 * from=200, to=1000 * from=16, to=1000 * from=1000, to=Integer.MAX_VALUE */ protected static void main(String args[]) { int from = Integer.parseInt(args[0]); int to = Integer.parseInt(args[1]); statistics(from,to); } /**
/** * Returns a prime number which is <code>>= desiredCapacity</code> and * very close to <code>desiredCapacity</code> (within 11% if * <code>desiredCapacity >= 1000</code>). * * @param desiredCapacity * the capacity desired by the user. * @return the capacity which should be used for a hashtable. */ protected int nextPrime(int desiredCapacity) { return PrimeFinder.nextPrime(desiredCapacity); }
/** * Tests correctness. Try from=1000, to=10000 from=200, to=1000 from=16, * to=1000 from=1000, to=Integer.MAX_VALUE */ protected static void main(String args[]) { int from = Integer.parseInt(args[0]); int to = Integer.parseInt(args[1]); statistics(from, to); }
/** * Returns a prime number which is <code>>= desiredCapacity</code> and very close to <code>desiredCapacity</code> (within 11% if <code>desiredCapacity >= 1000</code>). * @param desiredCapacity the capacity desired by the user. * @return the capacity which should be used for a hashtable. */ protected int nextPrime(int desiredCapacity) { return PrimeFinder.nextPrime(desiredCapacity); } /**
/** * Tests correctness. Try from=1000, to=10000 from=200, to=1000 from=16, * to=1000 from=1000, to=Integer.MAX_VALUE */ protected static void main(String args[]) { int from = Integer.parseInt(args[0]); int to = Integer.parseInt(args[1]); statistics(from, to); }
/** * Returns a prime number which is <code>>= desiredCapacity</code> and very close to <code>desiredCapacity</code> (within 11% if <code>desiredCapacity >= 1000</code>). * @param desiredCapacity the capacity desired by the user. * @return the capacity which should be used for a hashtable. */ protected int nextPrime(int desiredCapacity) { return PrimeFinder.nextPrime(desiredCapacity); } /**
/** * Tests correctness. Try from=1000, to=10000 from=200, to=1000 from=16, * to=1000 from=1000, to=Integer.MAX_VALUE */ protected static void main(String args[]) { int from = Integer.parseInt(args[0]); int to = Integer.parseInt(args[1]); statistics(from, to); }
/** * Returns a prime number which is <code>>= desiredCapacity</code> and * very close to <code>desiredCapacity</code> (within 11% if * <code>desiredCapacity >= 1000</code>). * * @param desiredCapacity * the capacity desired by the user. * @return the capacity which should be used for a hashtable. */ protected int nextPrime(int desiredCapacity) { return PrimeFinder.nextPrime(desiredCapacity); }
/** * Tests correctness. Try * from=1000, to=10000 * from=200, to=1000 * from=16, to=1000 * from=1000, to=Integer.MAX_VALUE */ protected static void main(String args[]) { int from = Integer.parseInt(args[0]); int to = Integer.parseInt(args[1]); statistics(from,to); } /**
int primeCapacity = nextPrime(i);
int primeCapacity = nextPrime(i);
int primeCapacity = nextPrime(i);
int primeCapacity = nextPrime(i);
int primeCapacity = nextPrime(i);
public void layoutPartition(LayoutPartition partition) { this.partition = partition; int nodeCount = partition.nodeCount(); nodeIndexToDataMap = new OpenLongObjectHashMap(PrimeFinder.nextPrime(nodeCount)); nodeIndexToLayoutIndex = new OpenLongIntHashMap(PrimeFinder.nextPrime(nodeCount)); squared_size = network.getNodeCount() * context.sizeFactor; epoch = 1; adaption = context.initialAdaptation; System.out.println("Epoch: " + epoch + " maxEpoch: " + context.maxEpoch); while (epoch < context.maxEpoch) { partition.resetNodes(); adjust(); updateParameters(); if (cancelled) break; } }