jump to navigation

Edge generator June 3, 2008

Posted by genetical in Genetic Algorithms.
Tags: , , ,
add a comment

We made a class, Util.java that takes two ArrayLists of objects that represent open nodes of two molecules as ArrayLists, and creates a random number of edges limited by the molecule that has less available nodes (smaller ArrayList). Each edge is generated by selecting a random node from each molecule’s ArrayList and pairing them together in another ArrayList of Object arrays. After a node is selected, it is removed from the molecule’s respective ArrayList. This process is repeated as many times as we have randomly selected the number of edges to be. We also created a driver class called Driver.java which sent test input that ran successfully.

-Chris