I'm trying to sample multiple observations from a GeneralDiscreteDistribution as following, but always get 0 as the elements of output array:
...
double[] transProbRow = emoStateTransMatrix.GetRow(currentEmoState);
GeneralDiscreteDistribution gdd = new GeneralDiscreteDistribution(transProbRow);
int[] emoParticles = gdd.Generate(100); // This gives me an all zero vector
...
But if I sample in the following way everything works fine
...
double[] transProbRow = emoStateTransMatrix.GetRow(currentEmoState);
GeneralDiscreteDistribution gdd = new GeneralDiscreteDistribution(transProbRow);
int[] emoParticles = new int[100];
for(int i=0; i<100; i++)
emoParticles[i] = gdd.Generate();
...
Am I using the Generate function wrong in the first case or is this a some kind of bug?