Ignore:
Timestamp:
07/27/15 21:39:33 (7 years ago)
Author:
bburlacu
Message:

#2442: Added new interpreter as described above. The new function symbol accepts lambdas in the constructor and gets intitialized with a fixed arity. The MethodInfo of the provided lambda is stored internally and used by the interpreter. The MethodInfo field should be [Storable] but this would require a small change to the serializer (relatively trivial I think). Currently it works with the programmable problem and the SymbolicExpressionTreeEncoding (see attached example).

Location:
branches/HeuristicLab.LinqExpressionTreeInterpreter
Files:
1 added
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.LinqExpressionTreeInterpreter/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/OpCodes.cs

    r12012 r12807  
    8383    public const byte Erf = 43;
    8484    public const byte Bessel = 44;
     85    public const byte UserDefinedFunction = 46;
    8586
    8687    private static Dictionary<Type, byte> symbolToOpcode = new Dictionary<Type, byte>() {
     
    110111      { typeof(Power),OpCodes.Power},
    111112      { typeof(Root),OpCodes.Root},
    112       { typeof(TimeLag), OpCodes.TimeLag}, 
     113      { typeof(TimeLag), OpCodes.TimeLag},
    113114      { typeof(Integral), OpCodes.Integral},
    114115      { typeof(Derivative), OpCodes.Derivative},
     
    130131      { typeof(Norm), OpCodes.Norm},
    131132      { typeof(Erf), OpCodes.Erf},
    132       { typeof(Bessel), OpCodes.Bessel}   
     133      { typeof(Bessel), OpCodes.Bessel},
     134      { typeof(FunctionSymbol), OpCodes.UserDefinedFunction }
    133135    };
    134136
Note: See TracChangeset for help on using the changeset viewer.