/** GPNodeContainer.java * J Scott Cameron * * This class holds a GPNode and the associated fitness **/ import java.io.*; import java.util.*; import GPNode; public class GPNodeContainer { private GPNode gpn;/* root node of the function tree to be evaluated */ private double rating;/* the rating of the function tree */ /* default constructor */ public GPNodeContainer() { } /* parameterized constructor */ public GPNodeContainer(GPNode gpn) { rating = 0; this.gpn = gpn; } /* copy constructor */ public GPNodeContainer(GPNodeContainer gpnc) { rating = gpnc.rating; gpn = gpnc.gpn; } /* returns the root node */ public GPNode getNode() { return gpn; } /* returns the fitness rating */ public double getRating() { return rating; } /* sets the fitness rating */ public void setRating(double rating) { this.rating = rating; } }