Re: [math] integer factorization -> MATH-845

2012-08-12 Thread matic
Yes I was thinking a little bit more than just factorization, sorry I did not state it clearly at the start. I created a ticket in JIRA for this: https://issues.apache.org/jira/browse/MATH-845 Please let me know your opinion about it. About "fast prime number generation" what is missing with a

Re: [math] integer factorization

2012-08-12 Thread Phil Steitz
On 8/7/12 3:48 AM, Gilles Sadowski wrote: > Hello. > >>> However do you have a concrete use-case for this feature? >>> What >> about an implementation with "BigInteger"? I'd guess that would make > >> the feature more apt to be used in "real" applications (just >> guessing). >> Well I have to admit

Re: [math] integer factorization

2012-08-12 Thread J.Pietschmann
Am 06.08.2012 02:43, schrieb ma...@nimp.co.uk: > If the factorization of integers is not in scope of commons math, what > about removing it from "MathWishList" then ? Hmm, the MathWishList lists primality testing. This *is* in scope, and probably also fast prime number generation (not only the "ne

Re: [math] integer factorization

2012-08-07 Thread Ted Dunning
For hash tables, int nextPrimeAfter(int) would be useful. On Tue, Aug 7, 2012 at 8:00 AM, matic wrote: > would contain the following methods: > > public static boolean isPrime(int > n) > public static List primeFactors(int n) > > and a few private > ones. >

Re: [math] integer factorization

2012-08-07 Thread matic
> Given the potential for extension, this should definitely not go in > "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 d

Re: [math] integer factorization

2012-08-07 Thread Gilles Sadowski
Hello. > > > However do you have a concrete use-case for this feature? > > > What > about an implementation with "BigInteger"? I'd guess that would make > > the feature more apt to be used in "real" applications (just > guessing). > Well I have to admit that my current use case is fairly > exoti

Re: [math] integer factorization

2012-08-07 Thread matic
> However do you have a concrete use-case for this feature? > What about an implementation with "BigInteger"? I'd guess that would make > the feature more apt to be used in "real" applications (just guessing). Well I have to admit that my current use case is fairly exotic: testing whether an ir

Re: [math] integer factorization

2012-08-05 Thread Gilles Sadowski
On Sun, Aug 05, 2012 at 08:43:57PM -0400, ma...@nimp.co.uk wrote: > Thanks for the pointer to JAS, however its API is scary for someone who > just want to get the factors of a "small" integer... > If the factorization of integers is not in scope of commons math, what > about removing it from "MathW

Re: [math] integer factorization

2012-08-05 Thread ma...@nimp.co.uk
n Original Message: - From: J.Pietschmann j3322...@yahoo.de Date: Sun, 05 Aug 2012 23:26:37 +0200 To: dev@commons.apache.org Subject: Re: [math] integer factorization Am 04.08.2012 14:22, schrieb ma...@nimp.co.uk: > Thanks for your feedback and the pointer to PARI/GP. About existing stu

Re: [math] integer factorization

2012-08-05 Thread J.Pietschmann
Am 04.08.2012 14:22, schrieb ma...@nimp.co.uk: > Thanks for your feedback and the pointer to PARI/GP. About existing stuff, > it seems there is none written in Java: I asked the question on > stackoverflow a while ago, nobody knows any library for the JVM. Hehe, even StackOverflow fails occasional

Re: [math] integer factorization

2012-08-04 Thread ma...@nimp.co.uk
j3322...@yahoo.de Date: Tue, 31 Jul 2012 21:35:12 +0200 To: dev@commons.apache.org Subject: Re: [math] integer factorization Am 25.07.2012 08:26, schrieb ma...@nimp.co.uk: > It seems there is no open source library providing support for integer > factorization, what about implementing

Re: [math] integer factorization

2012-07-31 Thread J.Pietschmann
Am 25.07.2012 08:26, schrieb ma...@nimp.co.uk: > It seems there is no open source library providing support for integer > factorization, what about implementing it in commons.math ? There are quite a few open source libraries providing integer factorization, e.g. pari/gp (http://pari.math.u-bordea

[math] integer factorization

2012-07-24 Thread ma...@nimp.co.uk
Hello, It seems there is no open source library providing support for integer factorization, what about implementing it in commons.math ? At the moment I am just considering to contribute a rather naive implementation to factor int type only (with longs, we can feel that such approach is slow).