This commit is contained in:
gustavoromero 2000-11-24 17:43:02 +00:00
commit 2b8c049283
2 changed files with 9 additions and 6 deletions

View file

@ -92,6 +92,10 @@ void arg(int argc, char** argv)
in = trn_set.front().input.size();
out = trn_set.front().output.size();
hidden = hiddenp.value();
cout << trn_set << endl;
cout << in << " " << out << " " << hidden << endl;
}
//-----------------------------------------------------------------------------

View file

@ -30,12 +30,11 @@ struct phenotype
static unsigned trn_max, val_max, tst_max;
operator double(void) const { return val_ok; }
// operator double(void) const { return val_ok; }
friend bool operator<(const phenotype& a, const phenotype& b)
{
return a.val_ok < b.val_ok ||
(!(a.val_ok < b.val_ok) && a.mse_error < b.mse_error);
return a.val_ok < b.val_ok; // || (!(a.val_ok < b.val_ok) && a.mse_error < b.mse_error);
}
friend ostream& operator<<(ostream& os, const phenotype& p)
@ -48,7 +47,7 @@ struct phenotype
friend istream& operator>>(istream& is, phenotype& p)
{
return is;
return is; // complete me
}
};
@ -69,7 +68,7 @@ extern unsigned in, out, hidden;
class Chrom: public EO<phenotype>, public genotype
{
public:
Chrom(): genotype(in, out, vector<unsigned>(1, hidden)) {}
Chrom(): genotype(in, out, vector<unsigned>(hidden < 1 ? 0 : 1, hidden)) {}
string className() const { return "Chrom"; }
@ -82,7 +81,7 @@ public:
void readFrom (istream& is)
{
invalidate();
invalidate(); // complete me
}
};