Uses of Class
net.n1da.dev.euler.helper.LargeNumber
-
Packages that use LargeNumber Package Description net.n1da.dev.euler This package contains all classes that are necessary to solve problems given by the well-known Project Euler.net.n1da.dev.euler.helper This helper-package collects useful methods and classes to make the work at many places much easier ;) -
-
Uses of LargeNumber in net.n1da.dev.euler
Fields in net.n1da.dev.euler declared as LargeNumber Modifier and Type Field Description private LargeNumber[]
PE0013. numbers
Stores the given 100 50-digit numbers.Fields in net.n1da.dev.euler with type parameters of type LargeNumber Modifier and Type Field Description protected java.util.Hashtable<LargeNumber,LargeNumber>
PE0030. cache
Stores the sums of the powered digits.protected java.util.Hashtable<LargeNumber,LargeNumber>
PE0030. cache
Stores the sums of the powered digits.private java.util.ArrayList<LargeNumber>
PE0049. candidates
Memory for primes less than 1000 stored asLargeNumber
.private java.util.Hashtable<LargeNumber,java.lang.Integer>
PE0062. FoundCount
Stores the count how often the ordered digits of a cubic were foundprivate java.util.Hashtable<LargeNumber,LargeNumber>
PE0062. FoundFirst
Stores the very first cubic for every found ordered digitsprivate java.util.Hashtable<LargeNumber,LargeNumber>
PE0062. FoundFirst
Stores the very first cubic for every found ordered digitsprivate java.util.ArrayList<LargeNumber>
PE0029. mem
Storage for all foundLargeNumber
sprivate java.util.Hashtable<java.lang.Integer,java.util.ArrayList<LargeNumber>>
PE0051. mem
Internal memory for all primes referenced by their lengthMethods in net.n1da.dev.euler that return LargeNumber Modifier and Type Method Description protected LargeNumber
PE0030. getDigitSum(LargeNumber num)
Calculates the sum of all digits of the given number.protected LargeNumber
PE0034. getDigitSum(LargeNumber num)
Calculates the sum of all digits of the given number.Methods in net.n1da.dev.euler with parameters of type LargeNumber Modifier and Type Method Description protected LargeNumber
PE0030. getDigitSum(LargeNumber num)
Calculates the sum of all digits of the given number.protected LargeNumber
PE0034. getDigitSum(LargeNumber num)
Calculates the sum of all digits of the given number. -
Uses of LargeNumber in net.n1da.dev.euler.helper
Methods in net.n1da.dev.euler.helper that return LargeNumber Modifier and Type Method Description LargeNumber
LargeNumber. add(LargeNumber num)
Adds the given number to the current objects and returns the sum of both.LargeNumber
LargeNumber. clone()
Clones the current number to return a newLargeNumber
with the same values in itsdata
.LargeNumber
LargeNumber. getWithSortedDigits()
Just sorts the values indata
.LargeNumber
LargeNumber. mult(int n)
Multiplies the current number with the given integer value.LargeNumber
LargeNumber. mult(LargeNumber n)
Multiplies the current number with the givenLargeNumber
.static LargeNumber
LargeNumber. parse(java.lang.String line)
Parses the given string and creates a newLargeNumber()
with this value.LargeNumber
LargeNumber. pow(int exp)
Calculates the power of the current number by the given integer value.static LargeNumber[]
IO. readLargeNumbers(java.lang.String file, int max)
Reads the wanted number oflarge numbers
from the given file.LargeNumber
LargeNumber. replaceDigit(int search, int replace)
Replaces every occurrence of a wanted digit by another given digit.LargeNumber
LargeNumber. reverse()
Creates a copy of this large number that has reverse ordered digits.LargeNumber
LargeNumber. sub(LargeNumber num)
Subtracts the given number from the current objects and returns the difference of both.LargeNumber
LargeNumber. sumOfDigitFactorials()
Calculates the sum of the factorials of all digits of thisLargeNumber
.LargeNumber
LargeNumber. sumOfDigitPowers(int exp)
Calculates the sum of the power of all digits of thisLargeNumber
.LargeNumber
LargeNumber. sumOfDigits()
Calculates the sum of all digits of thisLargeNumber
.Methods in net.n1da.dev.euler.helper with parameters of type LargeNumber Modifier and Type Method Description LargeNumber
LargeNumber. add(LargeNumber num)
Adds the given number to the current objects and returns the sum of both.int
LargeNumber. compareTo(LargeNumber num)
Compares this object with the given one.boolean
LargeNumber. isPermutationOf(LargeNumber num)
Checks if the given number is a permutation of the current object.LargeNumber
LargeNumber. mult(LargeNumber n)
Multiplies the current number with the givenLargeNumber
.LargeNumber
LargeNumber. sub(LargeNumber num)
Subtracts the given number from the current objects and returns the difference of both.
-