Changeset 14777 for branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/PushEncoding.cs
- Timestamp:
- 03/23/17 01:11:18 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/PushEncoding.cs
r14746 r14777 3 3 4 4 namespace HeuristicLab.Problems.ProgramSynthesis.Push.Problem { 5 using System.Linq;6 5 7 6 using HeuristicLab.Common; … … 42 41 43 42 public static PushProgram MapToPushProgram(this IntegerVector vector, IReadOnlyList<string> enabledExpressions) { 44 //var expressions = vector45 // .Select(i => ExpressionTable.GetExpression(enabledExpressions[i]))46 // .ToArray();47 48 43 var expressions = new Expression[vector.Length]; 49 for (var i = 0; i < vector.Length; i++) 50 { 44 for (var i = 0; i < vector.Length; i++) { 51 45 expressions[i] = ExpressionTable.GetExpression(enabledExpressions[vector[i]]); 52 46 } 53 47 54 return new Expressions.PushProgram(expressions);48 return new PushProgram(expressions); 55 49 } 56 50 }
Note: See TracChangeset
for help on using the changeset viewer.