ZhouZhikang / jahmm

Automatically exported from code.google.com/p/jahmm
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

I can't get the KullbackLeiblerDistance #23

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hey guys, 

I'm trying to implement a simple program with Jahmm. I create two 
Hmm<ObservationInteger> variables, I introduce their data in order to model the 
HMM and I try to see their difference with these lines:

KullbackLeiblerDistanceCalculator cal = new KullbackLeiblerDistanceCalculator();
double dist = cal.distance(learntHmm, originalHmm);

But I can't compile it due this error:

method distance in class 
be.ac.ulg.montefiore.run.jahmm.toolbox.KullbackLeiblerDistanceCalculator cannot 
be applied to given types;
  required: be.ac.ulg.montefiore.run.jahmm.Hmm<O>,be.ac.ulg.montefiore.run.jahmm.Hmm<? super O>
  found: be.ac.ulg.montefiore.run.jahmm.Hmm<capture#11 of ?>,be.ac.ulg.montefiore.run.jahmm.Hmm<be.ac.ulg.montefiore.run.jahmm.ObservationInteger>
  reason: no instance(s) of type variable(s) O exist so that argument type be.ac.ulg.montefiore.run.jahmm.Hmm<be.ac.ulg.montefiore.run.jahmm.ObservationInteger> conforms to formal parameter type be.ac.ulg.montefiore.run.jahmm.Hmm<? super O>

Any suggestions?

Thanks in advance,

Original issue reported on code.google.com by miguel8...@gmail.com on 5 Nov 2011 at 1:46