- Timestamp:
- 11/16/08 00:39:50 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.GP.StructureIdentification/SymbolTable.cs
r656 r767 29 29 namespace HeuristicLab.GP.StructureIdentification { 30 30 class EvaluatorSymbolTable : StorableBase { 31 public const intADDITION = 1;32 public const intAND = 2;33 public const intAVERAGE = 3;34 public const intCONSTANT = 4;35 public const intCOSINUS = 5;36 public const intDIFFERENTIAL = 25;37 public const intDIVISION = 6;38 public const intEQU = 7;39 public const intEXP = 8;40 public const intGT = 9;41 public const intIFTE = 10;42 public const intLT = 11;43 public const intLOG = 12;44 public const intMULTIPLICATION = 13;45 public const intNOT = 14;46 public const intOR = 15;47 public const intPOWER = 16;48 public const intSIGNUM = 17;49 public const intSINUS = 18;50 public const intSQRT = 19;51 public const intSUBTRACTION = 20;52 public const intTANGENS = 21;53 public const intVARIABLE = 22;54 public const intXOR = 23;55 public const intUNKNOWN = 24;31 public const byte ADDITION = 1; 32 public const byte AND = 2; 33 public const byte AVERAGE = 3; 34 public const byte CONSTANT = 4; 35 public const byte COSINUS = 5; 36 public const byte DIFFERENTIAL = 25; 37 public const byte DIVISION = 6; 38 public const byte EQU = 7; 39 public const byte EXP = 8; 40 public const byte GT = 9; 41 public const byte IFTE = 10; 42 public const byte LT = 11; 43 public const byte LOG = 12; 44 public const byte MULTIPLICATION = 13; 45 public const byte NOT = 14; 46 public const byte OR = 15; 47 public const byte POWER = 16; 48 public const byte SIGNUM = 17; 49 public const byte SINUS = 18; 50 public const byte SQRT = 19; 51 public const byte SUBTRACTION = 20; 52 public const byte TANGENS = 21; 53 public const byte VARIABLE = 22; 54 public const byte XOR = 23; 55 public const byte UNKNOWN = 24; 56 56 57 private static Dictionary<Type, int> staticTypes = new Dictionary<Type, int>();57 private static Dictionary<Type, byte> staticTypes = new Dictionary<Type, byte>(); 58 58 59 59 // needs to be public for persistence mechanism (Activator.CreateInstance needs empty constructor) 60 60 static EvaluatorSymbolTable() { 61 staticTypes = new Dictionary<Type, int>();61 staticTypes = new Dictionary<Type, byte>(); 62 62 staticTypes[typeof(Addition)] = ADDITION; 63 63 staticTypes[typeof(And)] = AND; … … 86 86 } 87 87 88 internal static intMapFunction(IFunction function) {88 internal static byte MapFunction(IFunction function) { 89 89 if(staticTypes.ContainsKey(function.GetType())) return staticTypes[function.GetType()]; 90 90 else return UNKNOWN;
Note: See TracChangeset
for help on using the changeset viewer.