[Biojava-l] issue in class Distribution

Alberto Ambesi ambesi at tigem.it
Tue Dec 2 11:49:27 EST 2003


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);
         }
     }
}

if I plot the output, I see that computation time of each cycle 
increases with time. This makes this class unusable for my purpose. 
Thank you for addressing this issue.

Alberto Ambesi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 2285 bytes
Desc: not available
Url : http://portal.open-bio.org/pipermail/biojava-l/attachments/20031202/ae076f77/attachment-0001.bin


More information about the Biojava-l mailing list