Package org.encog.ml.prg

Examples of org.encog.ml.prg.EncogProgramContext.defineVariable()


    String funct = holder.getString("funct", false, null);
   
    EncogProgramContext context = new EncogProgramContext();
    StringTokenizer tok = new StringTokenizer(variables,",");
    while(tok.hasMoreElements()) {
      context.defineVariable(tok.nextToken());
    }

    if( "numeric".equalsIgnoreCase(funct) ) {
      StandardExtensions.createNumericOperators(context);
    }
View Full Code Here


  public final File SERIAL_FILENAME = TEMP_DIR.createFile("encogtest.ser");
   
  private PrgPopulation create()
  {
    EncogProgramContext context = new EncogProgramContext();
    context.defineVariable("x");
    StandardExtensions.createAll(context);
    PrgPopulation pop = new PrgPopulation(context,10);
    EncogProgram prg1 = new EncogProgram(context);
    EncogProgram prg2 = new EncogProgram(context);
    prg1.compileExpression("x+1");
View Full Code Here

public class TestGenerate extends TestCase {

  public void testDepth() {
    EncogProgramContext context = new EncogProgramContext();
    context.defineVariable("x");
   
    StandardExtensions.createAll(context);
   
    PrgGrowGenerator rnd = new PrgGrowGenerator(context,2);
    EncogProgram prg = rnd.generate(new Random());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.