Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/11/08 18:35:45 (16 years ago)
Author:
gkronber
Message:

fixed #169 (Possibility to extend the set of available functions for GP via plugins)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Functions/BakedTreeEvaluator.cs

    r523 r642  
    4040      public int arity;
    4141      public int symbol;
     42      public IFunction function;
    4243    }
    4344
     
    7980            break;
    8081          }
     82        case EvaluatorSymbolTable.UNKNOWN: {
     83            instr.function = f.functionType;
     84            break;
     85          }
    8186      }
    8287      return instr;
     
    9398      int i = 1;
    9499      while(i > 0) {
    95         i+=codeArr[PC++].arity;
     100        i += codeArr[PC++].arity;
    96101        i--;
    97102      }
     
    247252            return Math.Abs(x - y);
    248253          }
    249         case EvaluatorSymbolTable.UNKNOWN:
     254        case EvaluatorSymbolTable.UNKNOWN: { // evaluate functions which are not statically defined directly
     255            return currInstr.function.Apply();
     256          }
    250257        default: {
    251258            throw new NotImplementedException();
Note: See TracChangeset for help on using the changeset viewer.