[Biojava-l] Distributions and collections
Schreiber, Mark
mark.schreiber@agresearch.co.nz
Thu, 8 Mar 2001 11:29:48 +1300
> -----Original Message-----
> From: Matthew Pocock [mailto:mrp@sanger.ac.uk]
> Sent: Thursday, March 08, 2001 12:59 AM
> To: Schreiber, Mark
> Cc: 'biojava-l@biojava.org'
> Subject: Re: [Biojava-l] Distributions and collections
>
>
> Hi Mark,
>
> I think that Distribution is closest in apperance to Map. Because it
> represents a probability distribution, it places certain
> restrictions on
> both the keys (symbols) and the values (doubles). Every
> Distribution has
> an associated Alphabet, which has size and iterator methods.
> An Alphabet
> most closely resembles a Set. What functionality from
> Collections would
> you see it usefull to access?
Mostly I wanted a way to sort the distribution although this could be done
by using the associated alphabet as a list of sorted keys, perhaps with
alphabet index. Could people see a use for a binary search type behaivour eg
find the symbol which has a probability distribution closest to 0.5?
Mostly I was thinking that distributions are so close to a map why don't we
implement them. At some point its gotta be useful to pass your distribution
to reallyUsefulMethod(Collection c).
>
> What would be the behavior of a Sequence comparator? When would it be
> used? Java makes it easy enough to define comparators as little inner
> class closure thingies, but if you can define how a sensible
> catch-all
> sequence comparator should work, and you have a use for it,
> check it in.
Mostly just daydreaming about how it may be useful to sort/compare symbols
by property ie purine/pyrimidine and a way to intellegently sort redundant
sequences (do R's go before or after Y's). Would anybody use anything like
this?
Just my 0.02
Mark
>
> Matthew
>
> Schreiber, Mark wrote:
>
> > Hi,
> >
> > Do people think it would be a good idea if Distributions
> implemented the
> > Collection interface?? This could conceivabley give access to the
> > functionality in the Collections class. Also would a
> Sequence comparator be
> > a good idea or is this functionality present elsewhere in Biojava?
> >
> > Just some rambling ideas, what do people think?
> >
> > Mark
> > _______________________________________________
> > Biojava-l mailing list - Biojava-l@biojava.org
> > http://biojava.org/mailman/listinfo/biojava-l
>
>
> _______________________________________________
> Biojava-l mailing list - Biojava-l@biojava.org
> http://biojava.org/mailman/listinfo/biojava-l
>