[Biojava-l] infinite alphabets
Matthew Pocock
matthew_pocock@yahoo.co.uk
Wed, 17 Jul 2002 23:56:42 +0100
Hi.
I've been tinkering with IntegerAlphabet and DoubleAlphabet with Mark
Schreiber. We were having some strange bugs and tracked them down to the
multiple symbols representing the same integer or double. Apparently
Thomas and I thought it was a good idea for symbols in infinite
alphabets not to be very clever about ==. Oh, the foolishness of youth.
So - symbols from infinite alpahbets are now cannonicalized. If you get
the Symbol instance for 365 from IntegerAlphabet seven times, you will
get the same object 7 times. This makes life much easer for things like
probabilities over integer ranges.
One more inconsistency squashed ;-)
Matthew