Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/08/17 11:57:42 (7 years ago)
Author:
pkimmesw
Message:

#2665 Storable problem data, Renamings due to typos, Removed GP from class names

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Generators/CodeGenerator.cs

    r14727 r14733  
    1919  public static class CodeGenerator {
    2020
    21     public static PushProgram RandomProgram(int maxPoints, IRandom random = null, IReadonlyPushGpConfiguration pushGpConfiguration = null, IDictionary<string, Expression> customExpressions = null) {
     21    public static PushProgram RandomProgram(int maxPoints, IRandom random = null, IReadonlyPushConfiguration pushGpConfiguration = null, IDictionary<string, Expression> customExpressions = null) {
    2222      var code = RandomCode(maxPoints, random, pushGpConfiguration, customExpressions);
    2323
     
    2525    }
    2626
    27     public static ExecExpandExpression RandomExpandExpression(int maxPoints, IRandom random = null, IReadonlyPushGpConfiguration pushGpConfiguration = null, IDictionary<string, Expression> customExpressions = null) {
     27    public static ExecExpandExpression RandomExpandExpression(int maxPoints, IRandom random = null, IReadonlyPushConfiguration pushGpConfiguration = null, IDictionary<string, Expression> customExpressions = null) {
    2828      var program = RandomProgram(maxPoints, random, pushGpConfiguration, customExpressions);
    2929
     
    3131    }
    3232
    33     public static IEnumerable<Expression> RandomCode(int maxPoints, IRandom random = null, IReadonlyPushGpConfiguration pushGpConfiguration = null, IDictionary<string, Expression> customExpressions = null) {
     33    public static IEnumerable<Expression> RandomCode(int maxPoints, IRandom random = null, IReadonlyPushConfiguration pushGpConfiguration = null, IDictionary<string, Expression> customExpressions = null) {
    3434      if (maxPoints == 0)
    3535        return new Expression[0];
    3636
    3737      random = random ?? new FastRandom();
    38       pushGpConfiguration = pushGpConfiguration ?? new PushGpConfiguration();
     38      pushGpConfiguration = pushGpConfiguration ?? new PushConfiguration();
    3939
    4040      if (pushGpConfiguration.EnabledExpressions.Count == 0)
     
    4646    }
    4747
    48     private static IEnumerable<Expression> RandomCodeWithSize(int points, IRandom random, IReadonlyPushGpConfiguration pushGpConfiguration, IDictionary<string, Expression> customExpressions = null) {
     48    private static IEnumerable<Expression> RandomCodeWithSize(int points, IRandom random, IReadonlyPushConfiguration pushGpConfiguration, IDictionary<string, Expression> customExpressions = null) {
    4949      if (points == 1) {
    5050
     
    7070    }
    7171
    72     private static Expression CreateExpression(IRandom random, IReadonlyPushGpConfiguration pushGpConfiguration, IDictionary<string, Expression> customExpressions = null) {
     72    private static Expression CreateExpression(IRandom random, IReadonlyPushConfiguration pushGpConfiguration, IDictionary<string, Expression> customExpressions = null) {
    7373      var customCount = customExpressions == null ? 0 : customExpressions.Count - 1;
    7474      var index = random.Next(0, pushGpConfiguration.EnabledExpressions.Count + customCount - 1);
     
    8585    }
    8686
    87     private static Expression CreateRandomErcExpression(IRandom random, IReadonlyPushGpConfiguration pushGpConfiguration) {
     87    private static Expression CreateRandomErcExpression(IRandom random, IReadonlyPushConfiguration pushGpConfiguration) {
    8888      var value = random.Next(0, 3);
    8989
Note: See TracChangeset for help on using the changeset viewer.