From: Christoph S. <ste...@us...> - 2002-05-18 15:29:41
|
Update of /cvsroot/cdk/cdk/org/openscience/cdk/structgen In directory usw-pr-cvs1:/tmp/cvs-serv10208/org/openscience/cdk/structgen Modified Files: RandomGenerator.java Log Message: Added the class VicinitySampler that generates all possible constitutional isomers that an be reached from a given structure by one Faulon mutation. Index: RandomGenerator.java =================================================================== RCS file: /cvsroot/cdk/cdk/org/openscience/cdk/structgen/RandomGenerator.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** RandomGenerator.java 26 Mar 2002 15:35:55 -0000 1.12 --- RandomGenerator.java 18 May 2002 15:29:37 -0000 1.13 *************** *** 326,341 **** } ! protected boolean chemConstraintsOk(Molecule test) ! { ! for (int f = 0; f < test.getAtomCount(); f++) ! { ! if (test.getBondOrderSum(test.getAtomAt(f)) != correctBondOrderSums[f]) ! { ! return false; ! } ! } ! return true; ! } ! /** * Analog of Math.max that returns the largest int value in an array of ints --- 326,330 ---- } ! /** * Analog of Math.max that returns the largest int value in an array of ints *************** *** 385,389 **** { this.molecule = mol; - initBondOrderSums(mol); } --- 374,377 ---- *************** *** 400,410 **** } - protected void initBondOrderSums(Molecule mol) - { - correctBondOrderSums = new int[mol.getAtomCount()]; - for (int f = 0; f < mol.getAtomCount(); f++) - { - correctBondOrderSums[f] = mol.getBondOrderSum(mol.getAtomAt(f)); - } - } } --- 388,390 ---- |