I did not realize that the methods are static methods (Thats why i tried
to use a constructor).
But how do I set up the vector with my probabilities?
And do I have to set a seed? which ones can I use?
Why is Vector used for the Method, and not ArrayList/LinkedList?
Thanks four your help.
Isabel Drost wrote:
On Fri, 04 Sep 2009 14:04:36 +0200
Sven Boekhoff <[email protected]> wrote:
UncommonDistributions dist = (UncommonDistributions) new
Object();
That won't work - you are casting an object of type "Object" to type
"UncommonDistributions".
// UncommonDistributions dist = new
UncommonDistributions();
That won't work either because the constructor of UncommonDistributions
is private (the class only contains static methods, so allowing
the creation of an instance of it does not really make sense).
UncommonDistributions.init(seed);
double random = UncommonDistributions.rMultinom(100, probabilities);
should work (seed being the seed you want to use) .
Isabel