diff --git a/eo/app/gprop/mlp.h b/eo/app/gprop/mlp.h index 779e53e8..e0e706a3 100644 --- a/eo/app/gprop/mlp.h +++ b/eo/app/gprop/mlp.h @@ -7,6 +7,7 @@ //----------------------------------------------------------------------------- +using namespace std; #include // MAXFLOAT MINFLOAT #include // exp #include // invalid_argument @@ -258,15 +259,7 @@ namespace mlp { l->reset(); } - vector operator()(const vector& input) const - { - vector tmp = input; - - for(const_iterator l = begin(); l != end(); ++l) - tmp = (*l)(tmp); - - return tmp; - } + virtual vector operator()(const vector& input) const ; unsigned winner(const vector& input) const { @@ -315,6 +308,18 @@ namespace mlp { } }; +#ifndef NO_MLP_VIRTUALS + vector net::operator()(const vector& input) const + { + vector tmp = input; + + for(const_iterator l = begin(); l != end(); ++l) + tmp = (*l)(tmp); + + return tmp; + } +#endif + //--------------------------------------------------------------------------- // sample