commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From matic <>
Subject Re: [math] integer factorization
Date Tue, 07 Aug 2012 13:00:03 GMT

> Given the potential for extension, this should definitely not go
> "ArithmeticUtils" but in a package of its own.
> Suggestions on how
to lay out the structure?

Maybe just a class
"org.apache.commons.math3.util.Prime" would do ? We can have one or more
package private class beneath to do the hard work...
for a start, it
would contain the following methods:

public static boolean isPrime(int
public static List<Integer> primeFactors(int n) 

and a few private

Later we can extend by adding overloaded versions of those
methods with long and/or BigInteger types.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message