Hello!
I am new to this forum. I am looking for some help. I am VERY new to C++ and am not too sure what the error I am getting means. The code I have in my class is shown below. The error is in the subject. Anyone? Anyone? Beuler?
class Score
{
public:
float calculScore(double &xx, double &y, int ng)
{
//computation of the score. Here it is for the oscillator.
int NombreGenes = 5;
int NombrePromus = 10;
int NombreReactions = 20;
int Reactions[30];
int nvar= y.nrows(); //declare an integer called nvar equal to the number of rows in the y array
int rep=NombreGenes+NombrePromus; //declare an integer called rep equal to the Number of Genes and the Number of Promoters
float s = 0; //variable called s equal to 0
int nstep=xx.size(); //declare an integer called nstep equal to the size of the xx array
for (int i=0;i<10;i++){ //for loop running 10 times, also declaring i
int v=rep+1; //declaring a variable 'v' equal to the Number of Genes and the Number of Promoters plus 1
if (ng==1)//ng is declared in the class constructor if ng is equal to 1 then run just below
s+= ((y[v][i]-10)*(y[v][i]-10)); // Gives s the value of y(array)times v(array) times i(the int in the for loop minus 10 squared
else//if ng is not one then run this below
s+= ((y[v][i]-1)*(y[v][i]-1));// Gives s the value of y(array)times v(array) times i(the int in the for loop minus 1 squared
}//end the for loop
int n=0;//variable called n equal to 0
for (int i=0;i<NombreReactions;i++){ //for loop running how ever many times there are reactions , also declaring i
if (Reactions[i].Constante!=0) //counter for the reactions
n++;//increment N
}
s*=exp(n*log(1.0001))/100.0;//multiplication factor. Basically, one multiplies by 1+0.0001*(#of reactions). It is essentially to discriminate between cells with exactly the same dynamics for the interesting variables but with different number of reactions
if(s<=1e10)
{
return s;
}
elsereturn 1e10; // filter big scores
}
};