> I just committed a new version of the pattern matching algorithm : bugs > correction, and performance enhancements.
Nico, I had a chance to quickly review some of the smiles code and wanted to give you some feedback on some simple mechanical things. SmilesMolecule.java ------------------- In SmilesMolecule.java you are maintaining SmilesAtom[] atoms and SmilesBond[] bonds. You double the size of these arrays when they need to grow. When you do that you are using an inline for loop to do the copying. To double the size of an array you can call org.jmol.viewer.Util.doubleLength(Object[]) ... as in if (atomsCount >= atoms.length) atoms = (SmilesAtom[])doubleLength(atom); Alternatively, if you wanted to maintain independence from the other packages, you could call System.arraycopy and use it to copy the elements of your array. SmilesAtom.java --------------- You are using Integer instead of int for atomicMass and hydrogenCount. You may want to consider making those variables type 'int'. If you need a null value then I recommend that you use Integer.MIN_VALUE Miguel ------------------------------------------------------- This SF.net email is sponsored by: 2005 Windows Mobile Application Contest Submit applications for Windows Mobile(tm)-based Pocket PCs or Smartphones for the chance to win $25,000 and application distribution. Enter today at http://ads.osdn.com/?ad_idh82&alloc_id148&op=click _______________________________________________ Jmol-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jmol-developers
