Hi there!

I have some runtime problems creating a SymbolList using an IntegerAlphabet 
to create the Symbols. That's what my code looks like:

public static SymbolList integerArray2IntegerSymbolList(int[] intAln) 
throws IllegalAlphabetException {

         int len = intAln.length;
         Symbol[] syms = new Symbol[len];

         IntegerAlphabet ialph = IntegerAlphabet.getInstance();

         for(int i=0; i<len; i++) {
                 syms[i] = ialph.getSymbol(intAln[i]);
         }
         end = System.nanoTime();

         SymbolList symList = new SimpleSymbolList(syms,len,ialph);
         return symList;
}

The command IntegerAlphabet ialph = IntegerAlphabet.getInstance() take 0.4 
seconds on my machine and makes up most of runtime of my program. Is there 
a more efficient way to create IntegerSymbols? Thank you, Tilman

Dr. rer. nat. Dipl.-Chem. Tilman Sauer
Department of Bioinformatics
UKG, Georg-August-University of Goettingen
Goldschmidtstr. 1
37077 Goettingen
Germany

phone: +49 551 39 14915
fax: +49 551 39 14914
email: [EMAIL PROTECTED]

_______________________________________________
Biojava-l mailing list  -  [email protected]
http://lists.open-bio.org/mailman/listinfo/biojava-l

Reply via email to