It solved the first part of my question. i do not know how to create a
vector.
I tried e.g.:
Vector probabilities = new Vector();
//to then set the values like:
probabilities.set((double) 0.1);
probabilities.set((double) 0.2);
probabilities.set((double) 0.3);
probabilities.set((double) 0.4);
But eclipse shows an error (but does not say what is wrong). I do not
know how to use interfaces. Obviously I can't use it as if it was a class.
Should be easy,... somehow.
Sean Owen wrote:
> I'm sorry it's actually me that is wrong. UncommonDistributions is a
> Mahout class. I made the wrong assumption based on the name and the
> fact that you seemed to be talking about java.util.Vector. The
> "Vector" here is Mahout's class.
>
> So does Isabel's answer solve your problem? You get a Vector with all
> the values you want back. You simply access with get() methods.
>
> On Fri, Sep 4, 2009 at 4:42 PM, Sven Boekhoff<sven@boekhoff.info> wrote:
>> there is no multinomial random number generator in UncommonsMath 
>> unfortonately. there is also no hypergeometric random number generator. I
>> thought it would be much easier to use an existing one, than write an own
>> one.
>> And once i know how to use the Vector interface, i might be ablie to use the
>> one provided by mahout. for the hypergeometric thing I might have to write
>> an own function,... (there should be a package providing those functions 
>> I'm wondering why there isn't one,...)
>>
>>
>> Sean Owen wrote:
>>> It seems like you're not really using Mahout, but a library that
>>> Mahout uses  Uncommons Math. See
>>> https://uncommonsmaths.dev.java.net/ . I think this is the library,
>>> and documentation, you really need. Everything you refer to are not
>>> Mahout APIs.
>>>
>>> On Fri, Sep 4, 2009 at 3:08 PM, Sven Boekhoff<sven@boekhoff.info> wrote:
>>>> 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.
