[Biojava-l] issue in class Distribution

David Huen david.huen at ntlworld.com
Wed Dec 3 03:55:39 EST 2003


On Tuesday 02 Dec 2003 4:49 pm, Alberto Ambesi wrote:
> hi, I found this bug when using Distrubutions iteratively many times.
> The problem is that when creating Distrubution objects iteratively
> computation time for each iteration increases with time.
>
> this is a piece of code that demonstrates the issue:
>
> public class DistributionTest {
>      public static void main(String[] args) throws Exception{
>          long timePoint = System.currentTimeMillis();
>          for (int i=0; i<2500; i++) {
>              Map map = new HashMap();
>              map.put("seq0", DNATools.createDNA("aggag"));
>              map.put("seq1", DNATools.createDNA("aggaa"));
>              map.put("seq2", DNATools.createDNA("aggag"));
>              map.put("seq3", DNATools.createDNA("aagag"));
>              Alignment align = new SimpleAlignment(map);
>              Distribution[] dists = distOverAlignment2(align, false,
> 0.01);
>              long previousPoint = timePoint;
>              timePoint = System.currentTimeMillis();
>              System.out.println(timePoint - previousPoint);
>          }
>      }
> }
>

Could you provide the source to distOverAlignment2 so it becomes clear what 
it is doing?

Thanks,
David Huen



More information about the Biojava-l mailing list