Just look at the org.apache.mahout.matrix.Vector interface? should be
pretty clear. Like with the java.util.Vector interface the 'set'
operation necessarily needs a position argument!

probabilities.set(0, 0.2);
probabilities.set(1, 0.1);
...


On Fri, Sep 4, 2009 at 5:18 PM, Sven Boekhoff<[email protected]> wrote:
> 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.

Reply via email to