All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ec.gp.GPData Maven / Gradle / Ivy

Go to download

ECJ, A Java-based Evolutionary Computation Research System. ECJ is a research EC system written in Java. It was designed to be highly flexible, with nearly all classes (and all of their settings) dynamically determined at runtime by a user-provided parameter file. All structures in the system are arranged to be easily modifiable. Even so, the system was designed with an eye toward efficiency. ECJ is developed at George Mason University's ECLab Evolutionary Computation Laboratory. The software has nothing to do with its initials' namesake, Evolutionary Computation Journal. ECJ's sister project is MASON, a multi-agent simulation system which dovetails with ECJ nicely.

The newest version!
/*
  Copyright 2006 by Sean Luke
  Licensed under the Academic Free License version 3.0
  See the file "LICENSE" for more information
*/


package ec.gp;
import ec.*;
import ec.util.*;

/* 
 * GPData.java
 * 
 * Created: Mon Oct 25 19:37:18 1999
 * By: Sean Luke
 */

/**
 * GPData is the parent class of data transferred between GPNodes.
 * If performed correctly, there need be only one GPData instance 
 * ever created in the evaluation of many individuals. 
 *
 * 

You can use GPData as-is if you have absolutely no data to * transfer between individuals. Otherwise, you need to subclas * GPData, add your own instance variables, and then override * the copyTo(...) method and, depending on whether the data has * pointers in it (like arrays), the clone() method as well.

Default Base
gp.data * * @author Sean Luke * @version 1.0 */ public class GPData implements Prototype { public static final String P_GPDATA = "data"; /** Modifies gpd so that gpd is equivalent to us. You may safely assume that gpd is of the same class as we are. Do not share pointers with the other object, except to read-only data: instead, copy any read-write data as necessary. */ public void copyTo(final GPData gpd) { } public Parameter defaultBase() { return GPDefaults.base().push(P_GPDATA); } public void setup(final EvolutionState state, final Parameter base) { } public Object clone() { try { return super.clone(); } catch (CloneNotSupportedException e) { throw new InternalError(); } // never happens } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy