From 9b7765e21d3e7d2ea99a7266b72367aeef42968c Mon Sep 17 00:00:00 2001 From: Matthew Ellison Date: Sat, 2 Mar 2019 19:34:42 -0500 Subject: [PATCH] Updated the README to show the new algorithms --- README.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cf164c2..e3d3873 100644 --- a/README.md +++ b/README.md @@ -13,4 +13,19 @@ Example of usage: timer.stop(); System.out.printf("It took %s to run this algorithm", timer.getStr()); //You could also do something like this if you prefered - System.out.printf("It took %f milliseconds to run this algorithm", timer.getMilli()); \ No newline at end of file + System.out.printf("It took %f milliseconds to run this algorithm", timer.getMilli()); + +#Algorithms +This is a class that contains many different algorithms that I have found it useful to keep around. +All algorithms are overloaded to allow for using both Integer and BigInteger types. +Examples of usage: + primes = getPrimes(topNum); //primes now holds all primes less than or equal to topNum + primes = getNumPrimes(numPrimes); //primes now holds an ArrayList containing the first numPrimes prime numbers + factors = getFactors(number); //factors now holds an ArrayList containing the factors of number + divisors = getDivisors(number); //divisors now holds an ArrayList containing all the divisors of number + fib = getFib(number); //fib now holds the number element in the fibonacci sequence + fib = getAllFib(highestNumber); //fib now holds an ArrayList containing all fibonacci numbers less than or equal to highestNumber + sum = getSum(numbers); //sum now holds the sum of all elements in the ArrayList numbers + sum = getBigSum(numbers): //Same as getSum, but for BigInteger + prod = getProd(numbers); //prod now holds the product of all elements in the ArrayList numbers + prod = getBigProd(numbers); //Same as getProd, but for BigInteger \ No newline at end of file