Commit 00c45f4b authored by Cancino Waldo's avatar Cancino Waldo

Add Alberto's code

Fix compilation on MacOSX
Update the grammar generated files
parent 4829b1f8
File mode changed from 100755 to 100644
This diff is collapsed.
......@@ -427,7 +427,7 @@ exponent ([Ee][+-]?[0-9]+)
<GP_RULE_ANALYSIS>"//".*"\n" {}
<GP_RULE_ANALYSIS>"\""([a-zA-Z0-9]|\(|\)|\*|\+|\-|\/|\%)*"\"" {
<GP_RULE_ANALYSIS>"\""([a-zA-Z0-9_]|\(|\)|\*|\+|\-|\/|\%|\[|\])*"\"" {
if( iGP_OPCODE_FIELD != 1 ){
fprintf(stderr,"Error, op code real name must be given at the second place\n");
exit(-1);
......
File mode changed from 100755 to 100644
This diff is collapsed.
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
......@@ -151,7 +151,7 @@ endif
#ifeq ($(UNAME),Darwin)
cd boost && make clean
#endif
#install:$(EXEC)
# sudo cp $< /usr/bin/dev-easea
......@@ -159,10 +159,10 @@ endif
#realclean: clean
# rm -f EaseaParse.cpp EaseaParse.h EaseaLex.cpp EaseaLex.h
# AT commented these lines, because they imply the presence of wine + programs in a specific location
#EaseaParse.cpp: EaseaParse.y
# wine ~/.wine/drive_c/Program\ Files/Parser\ Generator/BIN/ayacc.exe $< -Tcpp -d
EaseaParse.cpp: EaseaParse.y
wine ~/.wine/drive_c/Program\ Files/Parser\ Generator/BIN/ayacc.exe $< -Tcpp -d
EaseaLex.cpp: EaseaLex.l
wine ~/.wine/drive_c/Program\ Files/Parser\ Generator/BIN/ALex.exe $< -Tcpp -i
#EaseaLex.cpp: EaseaLex.l
# wine ~/.wine/drive_c/Program\ Files/Parser\ Generator/BIN/ALex.exe $< -Tcpp -i
#endif
File mode changed from 100755 to 100644
......@@ -3,7 +3,12 @@
This is a standard GP implementation on EASEA,
aimed for regression.
use : easea -cuda_gp regression.ez
use : easea -gp regression.ez
make
OR (if you'd like to exploit a CUDA-compatible graphic card)
easea -cuda_gp regression.ez
make
in order to generate and compile this code.
......
......@@ -22,7 +22,9 @@
#include <typeinfo>
#include <float.h>
#include <limits.h>
#if not defined(__APPLE__)
#include <omp.h>
#endif
#include <string>
#define _MULTI_THREADED
......
......@@ -16,6 +16,13 @@ public:
for(int EASEA_Ndx=0; EASEA_Ndx<2; EASEA_Ndx++)
children[EASEA_Ndx]=NULL;
}
GPNode(int var_id, double erc_value, char opCode, GPNode** childrenToAdd) : var_id(var_id), erc_value(erc_value), opCode(opCode)// other constructor
{
for(int EASEA_Ndx=0; EASEA_Ndx<2; EASEA_Ndx++)
this->children[EASEA_Ndx]=childrenToAdd[EASEA_Ndx];
}
GPNode(const GPNode &EASEA_Var) { // Copy constructor
var_id=EASEA_Var.var_id;
erc_value=EASEA_Var.erc_value;
......@@ -67,7 +74,8 @@ public:
// Class members
int var_id;
double erc_value;
char opCode;
// char opCode;
int opCode;
GPNode* children[2];
};
......
......@@ -5,7 +5,7 @@
#pragma comment(lib, "Winmm.lib")
#endif
/**
This is program entry for STD template for EASEA
This is program entry for GP template for EASEA
*/
\ANALYSE_PARAMETERS
......@@ -981,6 +981,8 @@ PopulationImpl::~PopulationImpl(){
#include <Parameters.h>
#include <string>
#include <CStats.h>
#include <list>
#include <map>
#include "CGPNode.h"
using namespace std;
......
\TEMPLATE_START
/**
This is program entry for STD template for EASEA
This is program entry for GP and STD template for EASEA
*/
......@@ -532,6 +532,8 @@ EvolutionaryAlgorithmImpl::~EvolutionaryAlgorithmImpl(){
#include <CIndividual.h>
#include <Parameters.h>
#include <string>
#include <list>
#include <map>
#include "CGPNode.h"
using namespace std;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment