On 25/06/15 15:55, Barry Haddow wrote: > From memory, I think you are correct. For recombination we only care if > the FF states are equal or not equal, the actual order does not matter. > The hypotheses are added to an (ordered) set when they get created, > where the orderer uses the RecombineCompare methods in WordsBitmap and > Hypothesis. If the insert() does not result in adding a new Hypothesis > to the set, then it is recombined. Look at the AddPrune() method in > HypothesisStackNormal.
What I'm seeing so far suggests that all we really need is a "less" operator. So simpler than what we have now, but still an asymmetric comparison. How about I rename RecombineCompare to RecombineCompareLess, and make it return a bool? > WordsBitmap can be a major performance hog (e.g. scanning for first > zero) so if you can find something faster (yet still allows arbitrarily > large distortion limit) that would be great, Unfortunately it doesn't look as if gcc 4.9 specializes <algorithm> for vector<bool>. So as it stands, a std::find() is going to be slower. Better to go with vector<char> for now, which is essentially what the current layout is. Jeroen _______________________________________________ Moses-support mailing list [email protected] http://mailman.mit.edu/mailman/listinfo/moses-support
