Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/HeuristicLab.ExtLibs/HeuristicLab.NativeInterpreter/0.1/NativeInterpreter-0.1/src/instruction.h @ 18242

Last change on this file since 18242 was 18220, checked in by gkronber, 3 years ago

#3136: reintegrated structure-template GP branch into trunk

File size: 1.1 KB
RevLine 
[16269]1#ifndef INSTRUCTION_H
2#define INSTRUCTION_H
3
4#include <cstdint>
5
6#include "vector_operations.h"
7
8enum OpCodes : uint8_t
9{
10    // same values as in OpCodes.cs
[16701]11    Add                = 1,
12    Sub                = 2,
13    Mul                = 3,
14    Div                = 4,
15    Sin                = 5,
16    Cos                = 6,
17    Tan                = 7,
18    Log                = 8,
19    Exp                = 9,
20    Var                = 18,
[18160]21    Number             = 20,
[16701]22    Power              = 22,
23    Root               = 23,
24    Square             = 28,
25    Sqrt               = 29,
26    Absolute           = 48,
[16356]27    AnalyticalQuotient = 49,
[16701]28    Cube               = 50,
29    CubeRoot           = 51,
[18160]30    Tanh               = 52,
[18220]31    SubFunction        = 53,
[18160]32    Constant           = 54
[16269]33};
34
35struct instruction
36{
37    // from Instruction.cs
38    uint8_t opcode;
39    uint16_t narg;
40
41    int childIndex;
42
43    // from LinearInstruction.cs
44    double value;
45    double weight; // necessary for variables
46
47    // pointer to data
48    double *buf;
49    double *data;
50};
51
52#endif
Note: See TracBrowser for help on using the repository browser.