* whitespace cleanup
This commit is contained in:
parent
56c6edab04
commit
70e60a50d2
195 changed files with 1763 additions and 1873 deletions
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
The Evolving Distribution Objects framework (EDO) is a template-based,
|
||||
ANSI-C++ evolutionary computation library which helps you to write your
|
||||
own estimation of distribution algorithms.
|
||||
|
|
|
|||
14
edo/COPYING
14
edo/COPYING
|
|
@ -1,5 +1,5 @@
|
|||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
|
|
@ -112,7 +112,7 @@ modification follow. Pay close attention to the difference between a
|
|||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
|
|
@ -432,7 +432,7 @@ decision will be guided by the two goals of preserving the free status
|
|||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
|
|
@ -455,9 +455,9 @@ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
|||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
|
|
|
|||
|
|
@ -25,4 +25,3 @@ Authors:
|
|||
*/
|
||||
|
||||
#include "edo"
|
||||
|
||||
|
|
|
|||
|
|
@ -60,4 +60,3 @@ private:
|
|||
};
|
||||
|
||||
#endif // !_edoBounderRng_h
|
||||
|
||||
|
|
|
|||
|
|
@ -39,16 +39,16 @@ public:
|
|||
|
||||
void operator()( EOT& sol )
|
||||
{
|
||||
unsigned int size = sol.size();
|
||||
assert(size > 0);
|
||||
unsigned int size = sol.size();
|
||||
assert(size > 0);
|
||||
|
||||
for (unsigned int d = 0; d < size; ++d) {
|
||||
for (unsigned int d = 0; d < size; ++d) {
|
||||
|
||||
if ( sol[d] < this->min()[d] || sol[d] > this->max()[d]) {
|
||||
// use EO's global "rng"
|
||||
sol[d] = rng.uniform( this->min()[d], this->max()[d] );
|
||||
}
|
||||
} // for d in size
|
||||
if ( sol[d] < this->min()[d] || sol[d] > this->max()[d]) {
|
||||
// use EO's global "rng"
|
||||
sol[d] = rng.uniform( this->min()[d], this->max()[d] );
|
||||
}
|
||||
} // for d in size
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ public:
|
|||
*/
|
||||
void operator ()(eoPop< EOT > & pop)
|
||||
{
|
||||
assert(pop.size() > 0);
|
||||
assert(pop.size() > 0);
|
||||
|
||||
//double temperature = _initial_temperature;
|
||||
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ public:
|
|||
*/
|
||||
void operator ()(eoPop< EOT > & pop)
|
||||
{
|
||||
assert(pop.size() > 0);
|
||||
assert(pop.size() > 0);
|
||||
|
||||
double temperature = _initial_temperature;
|
||||
|
||||
|
|
|
|||
|
|
@ -38,4 +38,3 @@ public:
|
|||
};
|
||||
|
||||
#endif // !_edoModifier_h
|
||||
|
||||
|
|
|
|||
|
|
@ -42,4 +42,3 @@ public:
|
|||
};
|
||||
|
||||
#endif // !_edoModifierMass_h
|
||||
|
||||
|
|
|
|||
|
|
@ -44,4 +44,3 @@ public:
|
|||
};
|
||||
|
||||
#endif // !_edoNormalMonoCenter_h
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// (c) Thales group, 2010
|
||||
/*
|
||||
Authors:
|
||||
Johann Dreo <johann.dreo@thalesgroup.com>
|
||||
Caner Candan <caner.candan@thalesgroup.com>
|
||||
Johann Dreo <johann.dreo@thalesgroup.com>
|
||||
Caner Candan <caner.candan@thalesgroup.com>
|
||||
*/
|
||||
|
||||
#ifndef _edoNormalMulti_h
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ public:
|
|||
{
|
||||
AtomType mean = distrib.mean()[i];
|
||||
AtomType variance = distrib.variance()[i];
|
||||
AtomType random = rng.normal(mean, variance);
|
||||
AtomType random = rng.normal(mean, variance);
|
||||
|
||||
assert(variance >= 0);
|
||||
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@ from numpy import arange
|
|||
if __name__ == '__main__':
|
||||
|
||||
for p1 in list(arange(0.1, 1.1, 0.1)):
|
||||
for p2 in list(arange(-1., 0., 0.1)) + list(arange(0., 1.1, 0.1)):
|
||||
for p3 in list(arange(0.1, 1.1, 0.1)):
|
||||
gen = '%d_%.1f_%.1f_%.1f_%.1f' % (PSIZE, MEAN, p1, p2, p3)
|
||||
cmd = CMD % ( PSIZE, MEAN, p1, p2, p3, gen, gen )
|
||||
print cmd
|
||||
system( cmd )
|
||||
for p2 in list(arange(-1., 0., 0.1)) + list(arange(0., 1.1, 0.1)):
|
||||
for p3 in list(arange(0.1, 1.1, 0.1)):
|
||||
gen = '%d_%.1f_%.1f_%.1f_%.1f' % (PSIZE, MEAN, p1, p2, p3)
|
||||
cmd = CMD % ( PSIZE, MEAN, p1, p2, p3, gen, gen )
|
||||
print cmd
|
||||
system( cmd )
|
||||
|
|
|
|||
36
eo/CHANGELOG
36
eo/CHANGELOG
|
|
@ -3592,7 +3592,7 @@ Date: Mon Jun 17 04:13:45 2002 +0000
|
|||
|
||||
Adding the truncation selectors.
|
||||
2 versions: eoTruncatedSelectOne is an eoSelectOne, and
|
||||
eoTruncatedSelectMany works like an eoSelectMany (but is NOT)
|
||||
eoTruncatedSelectMany works like an eoSelectMany (but is NOT)
|
||||
|
||||
Author: jeggermo <jeggermo>
|
||||
Date: Mon Jun 10 14:10:35 2002 +0000
|
||||
|
|
@ -4537,8 +4537,8 @@ Date: Sat Nov 10 09:02:17 2001 +0000
|
|||
|
||||
Small modifications here and there to be MSVC++ compatible
|
||||
Mainly, time.h -> ctime
|
||||
definition of loop index out of loops when multiply used
|
||||
no typename in declaration using template typename
|
||||
definition of loop index out of loops when multiply used
|
||||
no typename in declaration using template typename
|
||||
|
||||
Author: evomarc <evomarc>
|
||||
Date: Sat Nov 10 06:59:02 2001 +0000
|
||||
|
|
@ -4883,8 +4883,8 @@ Date: Mon Jul 2 13:31:04 2001 +0000
|
|||
|
||||
Changed the directory structure for gp
|
||||
now: eoParseTree <-- the eoParseTree class
|
||||
eoParseTreeDepthInit <-- the eoParseTree depth initializer (eoGpDepthInitializer)
|
||||
eoParseTreeOp <-- the operators (xover and mutation)
|
||||
eoParseTreeDepthInit <-- the eoParseTree depth initializer (eoGpDepthInitializer)
|
||||
eoParseTreeOp <-- the operators (xover and mutation)
|
||||
|
||||
base documentation written for:
|
||||
* eoParseTree
|
||||
|
|
@ -6014,8 +6014,8 @@ Date: Fri Feb 9 05:09:26 2001 +0000
|
|||
I also changed
|
||||
- the eoQuadratic into eoQuad (as dicussed with Maarten)
|
||||
- the eoBin into eoBit, with more appropriate names for the "binary"
|
||||
operators (that can be unary!) as no one protested when I posted on
|
||||
eodev list
|
||||
operators (that can be unary!) as no one protested when I posted on
|
||||
eodev list
|
||||
|
||||
Author: evomarc <evomarc>
|
||||
Date: Wed Feb 7 05:15:18 2001 +0000
|
||||
|
|
@ -6039,7 +6039,7 @@ Date: Wed Feb 7 05:04:24 2001 +0000
|
|||
Added selection methods
|
||||
eoBestSelect always return the best individual
|
||||
eoSequentialSelect a selectOne version of eoDetSelect (uses an index to
|
||||
return next offspring from sorted pop)
|
||||
return next offspring from sorted pop)
|
||||
|
||||
Author: evomarc <evomarc>
|
||||
Date: Thu Feb 1 05:27:36 2001 +0000
|
||||
|
|
@ -6630,16 +6630,16 @@ Author: evomarc <evomarc>
|
|||
Date: Mon Dec 4 06:58:43 2000 +0000
|
||||
|
||||
Added the lastCall construct: if the stopping condition becomes true in eoCheckPoint,
|
||||
a method called lastCall is called for everything contained in that checkpoint
|
||||
(stats, updaters and monitors). This can be extremely useful
|
||||
- for stateSavers (see below)
|
||||
- for monitoring things like rates of success of operators, where what you
|
||||
are interested in is the final result only.
|
||||
a method called lastCall is called for everything contained in that checkpoint
|
||||
(stats, updaters and monitors). This can be extremely useful
|
||||
- for stateSavers (see below)
|
||||
- for monitoring things like rates of success of operators, where what you
|
||||
are interested in is the final result only.
|
||||
Added of course a virtual method lastCall that does nothing by default in classes
|
||||
eoBaseStat, eoBaseSortedStat, eoUpdater and eoMonitor
|
||||
eoBaseStat, eoBaseSortedStat, eoUpdater and eoMonitor
|
||||
Added a boolean to control the save of the state in method eoCountedStateSaver::lastCall
|
||||
so you can ask that the state is saved at final population, whatever happens.
|
||||
I also added the corresponding constructor to take this into account.
|
||||
so you can ask that the state is saved at final population, whatever happens.
|
||||
I also added the corresponding constructor to take this into account.
|
||||
|
||||
Author: evomarc <evomarc>
|
||||
Date: Mon Dec 4 05:55:59 2000 +0000
|
||||
|
|
@ -6822,8 +6822,8 @@ Author: evomarc <evomarc>
|
|||
Date: Tue Nov 28 06:46:37 2000 +0000
|
||||
|
||||
Modified the contructor: the default value for the delimiter is now " "
|
||||
and I added a boolean argument to indicate whether or not we want to
|
||||
overwrite an existing file with same name (default is overwrite).
|
||||
and I added a boolean argument to indicate whether or not we want to
|
||||
overwrite an existing file with same name (default is overwrite).
|
||||
Added the getFileName accessor.
|
||||
|
||||
Author: evomarc <evomarc>
|
||||
|
|
|
|||
|
|
@ -457,7 +457,7 @@ DAMAGES.
|
|||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
# NOTE: only add something here if it is really needed by EO
|
||||
|
||||
include(CheckIncludeFile)
|
||||
|
|
@ -28,6 +27,3 @@ check_include_files(stdint.h "stdint.h" HAVE_STDINT_H)
|
|||
# check is to be added to get the proper set of headers. Example :
|
||||
|
||||
#check_symbol_exists(asymbol "symbole.h" HAVE_SYMBOLE)
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -233,4 +233,3 @@ operates.
|
|||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
|
||||
|
|
|
|||
|
|
@ -457,7 +457,7 @@ DAMAGES.
|
|||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
|
|
@ -500,5 +500,3 @@ necessary. Here is a sample; alter the names:
|
|||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
|
||||
|
|
|
|||
11
eo/NEWS
11
eo/NEWS
|
|
@ -7,11 +7,11 @@
|
|||
- GCC 4.3 compatibility
|
||||
- new versatile log system with several nested verbose levels
|
||||
- classes using intern verbose parameters marked as deprecated, please update your code accordingly if you use one of the following files:
|
||||
eo/src/eoCombinedInit.h
|
||||
eo/src/eoGenContinue.h
|
||||
eo/src/eoProportionalCombinedOp.h
|
||||
eo/src/utils/eoData.h
|
||||
eo/src/utils/eoStdoutMonitor.h
|
||||
eo/src/eoCombinedInit.h
|
||||
eo/src/eoGenContinue.h
|
||||
eo/src/eoProportionalCombinedOp.h
|
||||
eo/src/utils/eoData.h
|
||||
eo/src/utils/eoStdoutMonitor.h
|
||||
- an evaluator that throw an exception if a maximum eval numbers has been reached, independently of the number of generations
|
||||
- new monitor that can write on any ostream
|
||||
- new continuator that can catch POSIX system user signals
|
||||
|
|
@ -39,4 +39,3 @@
|
|||
* release 0.9.3z.1 (1. Oct. 2005)
|
||||
- Support gcc-3.4 and gcc.4.x.
|
||||
- Provide full automake/autoconf/configure support.
|
||||
|
||||
|
|
|
|||
11
eo/README
11
eo/README
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
EO README FILE
|
||||
EO README FILE
|
||||
|
||||
=======================================================================
|
||||
check latest news at http://eodev.sourceforge.net/
|
||||
check latest news at http://eodev.sourceforge.net/
|
||||
=======================================================================
|
||||
|
||||
Welcome to EO, the Evolving Objects library.
|
||||
|
|
@ -23,7 +22,7 @@ an introduction;)
|
|||
|
||||
|
||||
==================================================================
|
||||
BUILDING EO
|
||||
BUILDING EO
|
||||
==================================================================
|
||||
The basic installation procedure goes the following:
|
||||
|
||||
|
|
@ -50,7 +49,7 @@ specific about EO.
|
|||
|
||||
|
||||
===================================================================
|
||||
DIRECTORY STRUCTURE
|
||||
DIRECTORY STRUCTURE
|
||||
===================================================================
|
||||
After unpacking the archive file, you should end up with the following
|
||||
structure:
|
||||
|
|
@ -103,7 +102,7 @@ structure:
|
|||
|
||||
|
||||
===================================================================
|
||||
NOTES
|
||||
NOTES
|
||||
===================================================================
|
||||
If you extracted a fresh snapshot from the cvs-repository, remember
|
||||
to run
|
||||
|
|
|
|||
|
|
@ -29,4 +29,3 @@ IF(NOT WIN32 OR CYGWIN)
|
|||
ENDIF(NOT WIN32 OR CYGWIN)
|
||||
|
||||
######################################################################################
|
||||
|
||||
|
|
|
|||
|
|
@ -207,12 +207,12 @@ int correct(const mlp::net& net, const mlp::set& set)
|
|||
unsigned partial = 0;
|
||||
|
||||
for (unsigned i = 0; i < s->output.size(); ++i)
|
||||
if ((s->output[i] < 0.5 && net(s->input)[i] < 0.5) ||
|
||||
(s->output[i] > 0.5 && net(s->input)[i] > 0.5))
|
||||
++partial;
|
||||
if ((s->output[i] < 0.5 && net(s->input)[i] < 0.5) ||
|
||||
(s->output[i] > 0.5 && net(s->input)[i] > 0.5))
|
||||
++partial;
|
||||
|
||||
if (partial == s->output.size())
|
||||
++sum;
|
||||
++sum;
|
||||
}
|
||||
|
||||
return sum;
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ namespace l2
|
|||
while (++current_layer != rend())
|
||||
{
|
||||
reverse_iterator forward_layer = current_layer - 1;
|
||||
reverse_iterator backward_layer = current_layer + 1;
|
||||
reverse_iterator backward_layer = current_layer + 1;
|
||||
|
||||
for (unsigned j = 0; j < current_layer->size(); ++j)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ namespace std {
|
|||
istream& operator>>(istream& is, mlp::vector& v)
|
||||
{
|
||||
for (mlp::vector::iterator vi = v.begin() ; vi != v.end() ; vi++) {
|
||||
is >> *vi;
|
||||
is >> *vi;
|
||||
}
|
||||
return is;
|
||||
}
|
||||
|
|
@ -133,15 +133,15 @@ namespace mlp
|
|||
#ifdef HAVE_LIBYAML_CPP
|
||||
YAML_SERIALIZABLE_AUTO(neuron)
|
||||
void emit_yaml(YAML::Emitter&out) const {
|
||||
out << YAML::BeginMap;
|
||||
out << YAML::Key << "Class" << YAML::Value << "mlp::neuron";
|
||||
YAML_EMIT_MEMBER(out,bias);
|
||||
YAML_EMIT_MEMBER(out,weight);
|
||||
out << YAML::EndMap;
|
||||
out << YAML::BeginMap;
|
||||
out << YAML::Key << "Class" << YAML::Value << "mlp::neuron";
|
||||
YAML_EMIT_MEMBER(out,bias);
|
||||
YAML_EMIT_MEMBER(out,weight);
|
||||
out << YAML::EndMap;
|
||||
}
|
||||
void load_yaml(const YAML::Node& node) {
|
||||
YAML_LOAD_MEMBER(node, bias);
|
||||
YAML_LOAD_MEMBER(node, weight);
|
||||
YAML_LOAD_MEMBER(node, bias);
|
||||
YAML_LOAD_MEMBER(node, weight);
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
|
@ -213,17 +213,17 @@ namespace mlp {
|
|||
}
|
||||
#ifdef HAVE_LIBYAML_CPP
|
||||
friend ostream& operator<<(YAML::Emitter& e, const layer &l) {
|
||||
e << ((std::vector<neuron>)l);
|
||||
e << ((std::vector<neuron>)l);
|
||||
}
|
||||
|
||||
friend void operator>>(const YAML::Node& n, layer &l) {
|
||||
// These temporary variable shenanegins are necessary because
|
||||
// the compiler gets very confused about which template operator>>
|
||||
// function to use.
|
||||
// The following does not work: n >> l;
|
||||
// So we use a temporary variable thusly:
|
||||
std::vector<mlp::neuron> *obviously_a_vector = &l;
|
||||
n >> *obviously_a_vector;
|
||||
// These temporary variable shenanegins are necessary because
|
||||
// the compiler gets very confused about which template operator>>
|
||||
// function to use.
|
||||
// The following does not work: n >> l;
|
||||
// So we use a temporary variable thusly:
|
||||
std::vector<mlp::neuron> *obviously_a_vector = &l;
|
||||
n >> *obviously_a_vector;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -243,7 +243,7 @@ namespace std {
|
|||
istream& operator>>(istream& is, mlp::layer& l)
|
||||
{
|
||||
for (mlp::layer::iterator li = l.begin() ; li != l.end() ; li++) {
|
||||
is >> *li;
|
||||
is >> *li;
|
||||
}
|
||||
return is;
|
||||
}
|
||||
|
|
@ -277,13 +277,13 @@ namespace mlp {
|
|||
#ifdef HAVE_LIBYAML_CPP
|
||||
YAML_SERIALIZABLE_AUTO(net)
|
||||
void emit_members(YAML::Emitter&out) const {
|
||||
const std::vector<layer>* me_as_layer_vector = this;
|
||||
out << YAML::Key << "layers" << YAML::Value << *me_as_layer_vector;
|
||||
const std::vector<layer>* me_as_layer_vector = this;
|
||||
out << YAML::Key << "layers" << YAML::Value << *me_as_layer_vector;
|
||||
}
|
||||
|
||||
void load_members(const YAML::Node& node) {
|
||||
std::vector<layer>* me_as_layer_vector = this;
|
||||
node["layers"] >> *me_as_layer_vector;
|
||||
std::vector<layer>* me_as_layer_vector = this;
|
||||
node["layers"] >> *me_as_layer_vector;
|
||||
}
|
||||
#endif // HAVE_LIBYAML_CPP
|
||||
|
||||
|
|
@ -303,14 +303,14 @@ namespace mlp {
|
|||
is >> layer_size;
|
||||
layer_sizes.push_back(layer_size);
|
||||
}
|
||||
unsigned check_outputs;
|
||||
unsigned check_outputs;
|
||||
is >> check_outputs;
|
||||
assert (check_outputs == num_outputs);
|
||||
init (num_inputs,num_outputs,layer_sizes);
|
||||
// skip forward to pass up opening '<' char
|
||||
char c=' ';
|
||||
while (c!='<' && !is.eof()) { is >> c;}
|
||||
for (iterator l =begin() ; l != end(); l++) {
|
||||
// skip forward to pass up opening '<' char
|
||||
char c=' ';
|
||||
while (c!='<' && !is.eof()) { is >> c;}
|
||||
for (iterator l =begin() ; l != end(); l++) {
|
||||
is >> *l;
|
||||
}
|
||||
do { is >> c; } while (c == ' ' && !is.eof());
|
||||
|
|
@ -351,15 +351,15 @@ namespace mlp {
|
|||
}
|
||||
|
||||
void save(ostream &os) const {
|
||||
// Save the number of inputs, number of outputs, and number of hidden layers
|
||||
// Save the number of inputs, number of outputs, and number of hidden layers
|
||||
os << num_inputs() << "\n" << num_outputs() << "\n" << num_hidden_layers() << "\n";
|
||||
for(const_iterator l = begin(); l != end(); ++l)
|
||||
for(const_iterator l = begin(); l != end(); ++l)
|
||||
os << l->size() << " ";
|
||||
os << "\n";
|
||||
os << "< ";
|
||||
for(const_iterator l = begin(); l != end(); ++l)
|
||||
os << "\n";
|
||||
os << "< ";
|
||||
for(const_iterator l = begin(); l != end(); ++l)
|
||||
os << *l << " ";
|
||||
os << ">\n";
|
||||
os << ">\n";
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -454,7 +454,7 @@ namespace mlp {
|
|||
|
||||
void load(istream &is) {
|
||||
unsigned input_size, output_size;
|
||||
is >> input_size >> output_size;
|
||||
is >> input_size >> output_size;
|
||||
sample samp(input_size, output_size);;
|
||||
while (is >> samp) { push_back(samp); }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ namespace qp
|
|||
void reset()
|
||||
{
|
||||
for(iterator n = begin(); n != end(); ++n)
|
||||
n->reset();
|
||||
n->reset();
|
||||
}
|
||||
|
||||
vector operator()(const vector& input)
|
||||
|
|
@ -110,7 +110,7 @@ namespace qp
|
|||
vector output(size());
|
||||
|
||||
for(unsigned i = 0; i < output.size(); ++i)
|
||||
output[i] = (*this)[i](input);
|
||||
output[i] = (*this)[i](input);
|
||||
|
||||
return output;
|
||||
}
|
||||
|
|
@ -135,7 +135,7 @@ namespace qp
|
|||
void reset()
|
||||
{
|
||||
for(iterator l = begin(); l != end(); ++l)
|
||||
l->reset();
|
||||
l->reset();
|
||||
}
|
||||
|
||||
real train(const set& ts,
|
||||
|
|
|
|||
|
|
@ -211,4 +211,3 @@ template<class T> T euclidean_distance(const std::vector<T>& v1,
|
|||
//-----------------------------------------------------------------------------
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -36,4 +36,3 @@ SET_TARGET_PROPERTIES(gpsymreg PROPERTIES VERSION "${GPSYMREG_VERSION}")
|
|||
TARGET_LINK_LIBRARIES(gpsymreg eo eoutils)
|
||||
|
||||
######################################################################################
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: todos@geneura.ugr.es, http://geneura.ugr.es
|
||||
jeggermo@liacs.nl
|
||||
jeggermo@liacs.nl
|
||||
*/
|
||||
|
||||
#ifndef _FITNESS_FUNCTION_H
|
||||
|
|
@ -225,4 +225,3 @@ class RegFitness: public eoEvalFunc< eoParseTree<FitnessType, Node> >
|
|||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
Contact: todos@geneura.ugr.es, http://geneura.ugr.es
|
||||
|
||||
jeggermo@liacs.nl
|
||||
jeggermo@liacs.nl
|
||||
|
||||
*/
|
||||
|
||||
|
|
@ -146,25 +146,25 @@ int main(int argc, char *argv[])
|
|||
|
||||
// the parameters are passed on as well
|
||||
|
||||
RegFitness eval(generationCounter, initSequence, parameter);
|
||||
RegFitness eval(generationCounter, initSequence, parameter);
|
||||
|
||||
|
||||
|
||||
// Depth Initializor, set for Ramped Half and Half Initialization
|
||||
|
||||
eoParseTreeDepthInit<FitnessType, Node> initializer(parameter.InitMaxDepth, initSequence, true, true);
|
||||
eoParseTreeDepthInit<FitnessType, Node> initializer(parameter.InitMaxDepth, initSequence, true, true);
|
||||
|
||||
|
||||
|
||||
// create the initial population
|
||||
|
||||
Pop pop(parameter.population_size, initializer);
|
||||
Pop pop(parameter.population_size, initializer);
|
||||
|
||||
|
||||
|
||||
// and evaluate the individuals
|
||||
|
||||
apply<EoType>(eval, pop);
|
||||
apply<EoType>(eval, pop);
|
||||
|
||||
|
||||
|
||||
|
|
@ -335,10 +335,3 @@ int main(int argc, char *argv[])
|
|||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: todos@geneura.ugr.es, http://geneura.ugr.es
|
||||
jeggermo@liacs.nl
|
||||
jeggermo@liacs.nl
|
||||
*/
|
||||
|
||||
#ifndef _NODE_H
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: todos@geneura.ugr.es, http://geneura.ugr.es
|
||||
jeggermo@liacs.nl
|
||||
jeggermo@liacs.nl
|
||||
*/
|
||||
|
||||
#ifndef _PARAMETERS_FUNCTION_H
|
||||
|
|
@ -100,8 +100,8 @@ struct Parameters{
|
|||
|
||||
if (parser.userNeedsHelp())
|
||||
{
|
||||
parser.printHelp(cout);
|
||||
exit(1);
|
||||
parser.printHelp(cout);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -36,4 +36,3 @@ SET_TARGET_PROPERTIES(mastermind PROPERTIES VERSION "${MASTERMIND_VERSION}")
|
|||
TARGET_LINK_LIBRARIES(mastermind eo eoutils)
|
||||
|
||||
######################################################################################
|
||||
|
||||
|
|
|
|||
|
|
@ -51,8 +51,8 @@ int main(int argc, char** argv)
|
|||
}
|
||||
catch (exception& e)
|
||||
{
|
||||
cerr << argv[0] << ": " << e.what() << endl;
|
||||
exit(EXIT_FAILURE);
|
||||
cerr << argv[0] << ": " << e.what() << endl;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
170
eo/config.guess
vendored
170
eo/config.guess
vendored
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2004-03-03'
|
||||
timestamp='2011-05-05'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
|
|
@ -186,7 +186,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||
fi
|
||||
;;
|
||||
*)
|
||||
os=netbsd
|
||||
os=netbsd
|
||||
;;
|
||||
esac
|
||||
# The OS release
|
||||
|
|
@ -270,7 +270,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
|
||||
;;
|
||||
*5.*)
|
||||
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
|
||||
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
|
||||
;;
|
||||
esac
|
||||
# According to Compaq, /usr/sbin/psrinfo has been available on
|
||||
|
|
@ -342,7 +342,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||
echo i370-ibm-openedition
|
||||
exit 0 ;;
|
||||
*:OS400:*:*)
|
||||
echo powerpc-ibm-os400
|
||||
echo powerpc-ibm-os400
|
||||
exit 0 ;;
|
||||
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
|
||||
echo arm-acorn-riscix${UNAME_RELEASE}
|
||||
|
|
@ -419,23 +419,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||
# MiNT. But MiNT is downward compatible to TOS, so this should
|
||||
# be no problem.
|
||||
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
|
||||
echo m68k-atari-mint${UNAME_RELEASE}
|
||||
echo m68k-atari-mint${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
|
||||
echo m68k-atari-mint${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
exit 0 ;;
|
||||
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
|
||||
echo m68k-atari-mint${UNAME_RELEASE}
|
||||
echo m68k-atari-mint${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
|
||||
echo m68k-milan-mint${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
echo m68k-milan-mint${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
|
||||
echo m68k-hades-mint${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
echo m68k-hades-mint${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
|
||||
echo m68k-unknown-mint${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
echo m68k-unknown-mint${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
m68k:machten:*:*)
|
||||
echo m68k-apple-machten${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
|
|
@ -504,8 +504,8 @@ EOF
|
|||
echo m88k-motorola-sysv3
|
||||
exit 0 ;;
|
||||
AViiON:dgux:*:*)
|
||||
# DG/UX returns AViiON for all architectures
|
||||
UNAME_PROCESSOR=`/usr/bin/uname -p`
|
||||
# DG/UX returns AViiON for all architectures
|
||||
UNAME_PROCESSOR=`/usr/bin/uname -p`
|
||||
if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
|
||||
then
|
||||
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
|
||||
|
|
@ -614,52 +614,52 @@ EOF
|
|||
9000/[678][0-9][0-9])
|
||||
if [ -x /usr/bin/getconf ]; then
|
||||
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
|
||||
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
|
||||
case "${sc_cpu_version}" in
|
||||
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
|
||||
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
|
||||
532) # CPU_PA_RISC2_0
|
||||
case "${sc_kernel_bits}" in
|
||||
32) HP_ARCH="hppa2.0n" ;;
|
||||
64) HP_ARCH="hppa2.0w" ;;
|
||||
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
|
||||
case "${sc_cpu_version}" in
|
||||
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
|
||||
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
|
||||
532) # CPU_PA_RISC2_0
|
||||
case "${sc_kernel_bits}" in
|
||||
32) HP_ARCH="hppa2.0n" ;;
|
||||
64) HP_ARCH="hppa2.0w" ;;
|
||||
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
|
||||
esac ;;
|
||||
esac
|
||||
esac ;;
|
||||
esac
|
||||
fi
|
||||
if [ "${HP_ARCH}" = "" ]; then
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
|
||||
#define _HPUX_SOURCE
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#define _HPUX_SOURCE
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main ()
|
||||
{
|
||||
#if defined(_SC_KERNEL_BITS)
|
||||
long bits = sysconf(_SC_KERNEL_BITS);
|
||||
#endif
|
||||
long cpu = sysconf (_SC_CPU_VERSION);
|
||||
int main ()
|
||||
{
|
||||
#if defined(_SC_KERNEL_BITS)
|
||||
long bits = sysconf(_SC_KERNEL_BITS);
|
||||
#endif
|
||||
long cpu = sysconf (_SC_CPU_VERSION);
|
||||
|
||||
switch (cpu)
|
||||
{
|
||||
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
|
||||
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
|
||||
case CPU_PA_RISC2_0:
|
||||
#if defined(_SC_KERNEL_BITS)
|
||||
switch (bits)
|
||||
{
|
||||
case 64: puts ("hppa2.0w"); break;
|
||||
case 32: puts ("hppa2.0n"); break;
|
||||
default: puts ("hppa2.0"); break;
|
||||
} break;
|
||||
#else /* !defined(_SC_KERNEL_BITS) */
|
||||
puts ("hppa2.0"); break;
|
||||
#endif
|
||||
default: puts ("hppa1.0"); break;
|
||||
}
|
||||
exit (0);
|
||||
}
|
||||
switch (cpu)
|
||||
{
|
||||
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
|
||||
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
|
||||
case CPU_PA_RISC2_0:
|
||||
#if defined(_SC_KERNEL_BITS)
|
||||
switch (bits)
|
||||
{
|
||||
case 64: puts ("hppa2.0w"); break;
|
||||
case 32: puts ("hppa2.0n"); break;
|
||||
default: puts ("hppa2.0"); break;
|
||||
} break;
|
||||
#else /* !defined(_SC_KERNEL_BITS) */
|
||||
puts ("hppa2.0"); break;
|
||||
#endif
|
||||
default: puts ("hppa1.0"); break;
|
||||
}
|
||||
exit (0);
|
||||
}
|
||||
EOF
|
||||
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
|
||||
test -z "$HP_ARCH" && HP_ARCH=hppa
|
||||
|
|
@ -739,22 +739,22 @@ EOF
|
|||
exit 0 ;;
|
||||
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
|
||||
echo c1-convex-bsd
|
||||
exit 0 ;;
|
||||
exit 0 ;;
|
||||
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
|
||||
if getsysinfo -f scalar_acc
|
||||
then echo c32-convex-bsd
|
||||
else echo c2-convex-bsd
|
||||
fi
|
||||
exit 0 ;;
|
||||
exit 0 ;;
|
||||
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
|
||||
echo c34-convex-bsd
|
||||
exit 0 ;;
|
||||
exit 0 ;;
|
||||
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
|
||||
echo c38-convex-bsd
|
||||
exit 0 ;;
|
||||
exit 0 ;;
|
||||
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
|
||||
echo c4-convex-bsd
|
||||
exit 0 ;;
|
||||
exit 0 ;;
|
||||
CRAY*Y-MP:*:*:*)
|
||||
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
|
|
@ -778,14 +778,14 @@ EOF
|
|||
exit 0 ;;
|
||||
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
|
||||
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||||
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
|
||||
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||
exit 0 ;;
|
||||
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||||
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
|
||||
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||
exit 0 ;;
|
||||
5000:UNIX_System_V:4.*:*)
|
||||
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||||
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
|
||||
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||||
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
|
||||
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||
exit 0 ;;
|
||||
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
|
||||
|
|
@ -919,7 +919,7 @@ EOF
|
|||
EV6) UNAME_MACHINE=alphaev6 ;;
|
||||
EV67) UNAME_MACHINE=alphaev67 ;;
|
||||
EV68*) UNAME_MACHINE=alphaev68 ;;
|
||||
esac
|
||||
esac
|
||||
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
|
||||
if test "$?" = 0 ; then LIBC="-libc1" ; else LIBC="" ; fi
|
||||
echo ${UNAME_MACHINE}-${VENDOR}-linux${LIBC}
|
||||
|
|
@ -961,7 +961,7 @@ EOF
|
|||
s/.*supported targets: *//
|
||||
s/ .*//
|
||||
p'`
|
||||
case "$ld_supported_targets" in
|
||||
case "$ld_supported_targets" in
|
||||
elf32-i386)
|
||||
TENTATIVE="${UNAME_MACHINE}-${VENDOR}-linux"
|
||||
;;
|
||||
|
|
@ -1013,11 +1013,11 @@ EOF
|
|||
echo i386-sequent-sysv4
|
||||
exit 0 ;;
|
||||
i*86:UNIX_SV:4.2MP:2.*)
|
||||
# Unixware is an offshoot of SVR4, but it has its own version
|
||||
# number series starting with 2...
|
||||
# I am not positive that other SVR4 systems won't match this,
|
||||
# Unixware is an offshoot of SVR4, but it has its own version
|
||||
# number series starting with 2...
|
||||
# I am not positive that other SVR4 systems won't match this,
|
||||
# I just have to hope. -- rms.
|
||||
# Use sysv4.2uw... so that sysv4* matches it.
|
||||
# Use sysv4.2uw... so that sysv4* matches it.
|
||||
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
|
||||
exit 0 ;;
|
||||
i*86:OS/2:*:*)
|
||||
|
|
@ -1076,10 +1076,10 @@ EOF
|
|||
exit 0 ;;
|
||||
pc:*:*:*)
|
||||
# Left here for compatibility:
|
||||
# uname -m prints for DJGPP always 'pc', but it prints nothing about
|
||||
# the processor, so we play safe by assuming i386.
|
||||
# uname -m prints for DJGPP always 'pc', but it prints nothing about
|
||||
# the processor, so we play safe by assuming i386.
|
||||
echo i386-pc-msdosdjgpp
|
||||
exit 0 ;;
|
||||
exit 0 ;;
|
||||
Intel:Mach:3*:*)
|
||||
echo i386-pc-mach3
|
||||
exit 0 ;;
|
||||
|
|
@ -1114,8 +1114,8 @@ EOF
|
|||
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
|
||||
&& echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
|
||||
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
|
||||
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
|
||||
&& echo i486-ncr-sysv4 && exit 0 ;;
|
||||
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
|
||||
&& echo i486-ncr-sysv4 && exit 0 ;;
|
||||
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
|
||||
echo m68k-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
|
|
@ -1149,9 +1149,9 @@ EOF
|
|||
fi
|
||||
exit 0 ;;
|
||||
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
|
||||
# says <Richard.M.Bartel@ccMail.Census.GOV>
|
||||
echo i586-unisys-sysv4
|
||||
exit 0 ;;
|
||||
# says <Richard.M.Bartel@ccMail.Census.GOV>
|
||||
echo i586-unisys-sysv4
|
||||
exit 0 ;;
|
||||
*:UNIX_System_V:4*:FTX*)
|
||||
# From Gerald Hewes <hewes@openmarket.com>.
|
||||
# How about differentiating between stratus architectures? -djm
|
||||
|
|
@ -1173,11 +1173,11 @@ EOF
|
|||
exit 0 ;;
|
||||
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
|
||||
if [ -d /usr/nec ]; then
|
||||
echo mips-nec-sysv${UNAME_RELEASE}
|
||||
echo mips-nec-sysv${UNAME_RELEASE}
|
||||
else
|
||||
echo mips-unknown-sysv${UNAME_RELEASE}
|
||||
echo mips-unknown-sysv${UNAME_RELEASE}
|
||||
fi
|
||||
exit 0 ;;
|
||||
exit 0 ;;
|
||||
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
|
||||
echo powerpc-be-beos
|
||||
exit 0 ;;
|
||||
|
|
@ -1262,7 +1262,7 @@ EOF
|
|||
echo pdp10-unknown-its
|
||||
exit 0 ;;
|
||||
SEI:*:*:SEIUX)
|
||||
echo mips-sei-seiux${UNAME_RELEASE}
|
||||
echo mips-sei-seiux${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:DragonFly:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
|
||||
|
|
@ -1289,11 +1289,11 @@ main ()
|
|||
#include <sys/param.h>
|
||||
printf ("m68k-sony-newsos%s\n",
|
||||
#ifdef NEWSOS4
|
||||
"4"
|
||||
"4"
|
||||
#else
|
||||
""
|
||||
#endif
|
||||
); exit (0);
|
||||
); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -71,5 +71,3 @@
|
|||
|
||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||
#cmakedefine size_t
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: todos@geneura.ugr.es, http://geneura.ugr.es
|
||||
Marc.Schoenauer@polytechnique.fr
|
||||
mak@dhi.dk
|
||||
Marc.Schoenauer@polytechnique.fr
|
||||
mak@dhi.dk
|
||||
*/
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -57,14 +57,3 @@
|
|||
#include <boost/config/suffix.hpp>
|
||||
|
||||
#endif // BOOST_CONFIG_HPP
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -19,5 +19,3 @@
|
|||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -18,13 +18,13 @@ USAGE:
|
|||
Before including this header you must define one or more of define the following macros:
|
||||
|
||||
BOOST_LIB_NAME: Required: A string containing the basename of the library,
|
||||
for example boost_regex.
|
||||
for example boost_regex.
|
||||
BOOST_LIB_TOOLSET: Optional: the base name of the toolset.
|
||||
BOOST_DYN_LINK: Optional: when set link to dll rather than static library.
|
||||
BOOST_LIB_DIAGNOSTIC: Optional: when set the header will print out the name
|
||||
of the library selected (useful for debugging).
|
||||
of the library selected (useful for debugging).
|
||||
BOOST_AUTO_LINK_NOMANGLE: Specifies that we should link to BOOST_LIB_NAME.lib,
|
||||
rather than a mangled-name version.
|
||||
rather than a mangled-name version.
|
||||
|
||||
These macros will be undef'ed at the end of the header, further this header
|
||||
has no include guards - so be sure to include it only once from your library!
|
||||
|
|
@ -56,13 +56,13 @@ BOOST_LIB_TOOLSET: The compiler toolset name (vc6, vc7, bcb5 etc).
|
|||
BOOST_LIB_THREAD_OPT: "-mt" for multithread builds, otherwise nothing.
|
||||
|
||||
BOOST_LIB_RT_OPT: A suffix that indicates the runtime library used,
|
||||
contains one or more of the following letters after
|
||||
a hiphen:
|
||||
contains one or more of the following letters after
|
||||
a hiphen:
|
||||
|
||||
s static runtime (dynamic if not present).
|
||||
d debug build (release if not present).
|
||||
g debug/diagnostic runtime (release if not present).
|
||||
p STLPort Build.
|
||||
s static runtime (dynamic if not present).
|
||||
d debug build (release if not present).
|
||||
g debug/diagnostic runtime (release if not present).
|
||||
p STLPort Build.
|
||||
|
||||
BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.
|
||||
|
||||
|
|
@ -342,13 +342,3 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.
|
|||
#if defined(BOOST_AUTO_LINK_NOMANGLE)
|
||||
# undef BOOST_AUTO_LINK_NOMANGLE
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
// (C) Copyright John maddock 1999.
|
||||
// (C) David Abrahams 2002. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
|
|
|
|||
|
|
@ -106,4 +106,3 @@ class eoAged: public Object
|
|||
};
|
||||
|
||||
#endif EOAGE_H
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ using namespace std;
|
|||
// eoDrawable
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
/** eoDrawable is a template class that adds a drawing interface to an object.\\
|
||||
/** eoDrawable is a template class that adds a drawing interface to an object.
|
||||
Requisites for template instantiation are that the object must admit a default ctor
|
||||
and a copy ctor. The Object must be an eoObject, thus, it must have its methods: className,
|
||||
eoDrawables can be drawn on any two-dimensional surface; it can be added to any
|
||||
|
|
@ -61,4 +61,4 @@ class eoDrawable
|
|||
|
||||
};
|
||||
|
||||
#endif EODRAWABLE_H
|
||||
#endif //! EODRAWABLE_H
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@ PREFIX = "/usr"
|
|||
DATA = {
|
||||
'dirs': [ "%s/share/%s" % (PREFIX, NAME) ],
|
||||
'links': [ ("%s/src" % SOURCE, "%s/include/%s" % (PREFIX, NAME)),
|
||||
("%s/doc" % BINARY, "%s/share/%s/doc" % (PREFIX, NAME)),
|
||||
("%s/%s.pc" % (BINARY, NAME), "%s/lib/pkgconfig/%s.pc" % (PREFIX, NAME)),
|
||||
]
|
||||
("%s/doc" % BINARY, "%s/share/%s/doc" % (PREFIX, NAME)),
|
||||
("%s/%s.pc" % (BINARY, NAME), "%s/lib/pkgconfig/%s.pc" % (PREFIX, NAME)),
|
||||
]
|
||||
}
|
||||
|
||||
LIBRARIES = ["libcma.a", "libeo.a", "libeoutils.a", "libes.a", "libga.a"]
|
||||
|
|
@ -21,8 +21,8 @@ import os, sys
|
|||
|
||||
def isroot():
|
||||
if os.getuid() != 0:
|
||||
print '[WARNING] you have to be root'
|
||||
return False
|
||||
print '[WARNING] you have to be root'
|
||||
return False
|
||||
return True
|
||||
|
||||
def uninstall():
|
||||
|
|
@ -41,11 +41,11 @@ def data():
|
|||
|
||||
if __name__ == '__main__':
|
||||
if not isroot():
|
||||
sys.exit()
|
||||
sys.exit()
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
print 'Usage: %s [install|uninstall|data]' % sys.argv[0]
|
||||
sys.exit()
|
||||
print 'Usage: %s [install|uninstall|data]' % sys.argv[0]
|
||||
sys.exit()
|
||||
|
||||
if sys.argv[1] == 'install': install()
|
||||
elif sys.argv[1] == 'uninstall': uninstall()
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: todos@geneura.ugr.es, http://geneura.ugr.es
|
||||
Marc.Schoenauer@polytechnique.fr
|
||||
Marc.Schoenauer@polytechnique.fr
|
||||
CVS Info: $Date: 2001-06-21 12:03:17 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/test/RoyalRoad.h,v 1.3 2001-06-21 12:03:17 jmerelo Exp $ $Author: jmerelo $
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@ import sys
|
|||
|
||||
if __name__ == '__main__':
|
||||
if len(sys.argv) < 2:
|
||||
print 'Usage: boxplot.py [Results files, ...]'
|
||||
sys.exit()
|
||||
print 'Usage: boxplot.py [Results files, ...]'
|
||||
sys.exit()
|
||||
|
||||
for i in range(1, len(sys.argv)):
|
||||
pylab.boxplot( [ [ float(value) for value in line.split() ] for line in open( sys.argv[i] ).readlines() ] )
|
||||
pylab.boxplot( [ [ float(value) for value in line.split() ] for line in open( sys.argv[i] ).readlines() ] )
|
||||
|
||||
pylab.xlabel('iterations')
|
||||
pylab.show()
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ public :
|
|||
{
|
||||
if (!fitness_traits::needs_mapping)
|
||||
{
|
||||
throw runtime_error("eoPop: no scaling needed, yet a scaling function is defined");
|
||||
throw runtime_error("eoPop: no scaling needed, yet a scaling function is defined");
|
||||
}
|
||||
|
||||
(*p2w)(*this);
|
||||
|
|
@ -429,5 +429,3 @@ int main()
|
|||
std::cout << e.what() << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,3 @@ double real_value(const std::vector<double>& _ind)
|
|||
sum += _ind[i] * _ind[i];
|
||||
return sum/_ind.size();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,7 @@ int main()
|
|||
|
||||
// EO objects can be printed with stream operators
|
||||
std::cout << "chrom1 = " << chrom1 << std::endl
|
||||
<< "chrom2 = " << chrom2 << std::endl;
|
||||
<< "chrom2 = " << chrom2 << std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
#include <iostream>
|
||||
|
||||
#include <eoScalarFitness.h>
|
||||
|
|
@ -123,6 +122,3 @@ int main(int argc, char* argv[]) {
|
|||
cout << "Fitness achieved = " << pop[0].fitness() << endl;
|
||||
cout << "Function evaluations = " << evals.value() << endl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
// to avoid long name warnings
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4786)
|
||||
|
|
@ -113,38 +112,38 @@ int the_main(int argc, char **argv)
|
|||
|
||||
if (parser.userNeedsHelp())
|
||||
{
|
||||
parser.printHelp(std::cout);
|
||||
return 0;
|
||||
parser.printHelp(std::cout);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Either load or initialize
|
||||
if (load_name.value() != "")
|
||||
{
|
||||
state.load(load_name.value()); // load the rest
|
||||
state.load(load_name.value()); // load the rest
|
||||
}
|
||||
else
|
||||
{
|
||||
// else
|
||||
// else
|
||||
|
||||
// initialize rng and population
|
||||
// initialize rng and population
|
||||
|
||||
rng.reseed(seed.value());
|
||||
rng.reseed(seed.value());
|
||||
|
||||
pop.resize(2);
|
||||
pop.resize(2);
|
||||
|
||||
pop[0].fitness(1);
|
||||
pop[1].fitness(2);
|
||||
pop[0].fitness(1);
|
||||
pop[1].fitness(2);
|
||||
}
|
||||
|
||||
while(checkpoint(pop))
|
||||
{
|
||||
pop[0].fitness(pop[0].fitness() + 1);
|
||||
pop[0].fitness(pop[0].fitness() + 1);
|
||||
|
||||
time_t now = time(0);
|
||||
time_t now = time(0);
|
||||
|
||||
while (time(0) == now) {} // wait a second to test timed saver
|
||||
while (time(0) == now) {} // wait a second to test timed saver
|
||||
|
||||
std::cout << "gen " << generationCounter.value() << std::endl;
|
||||
std::cout << "gen " << generationCounter.value() << std::endl;
|
||||
}
|
||||
|
||||
// run the algorithm
|
||||
|
|
@ -152,9 +151,9 @@ int the_main(int argc, char **argv)
|
|||
// Save when needed
|
||||
if (save_name.value() != "")
|
||||
{
|
||||
std::string file_name = save_name.value();
|
||||
save_name.value() = ""; // so that it does not appear in the parser section of the state file
|
||||
state.save(file_name);
|
||||
std::string file_name = save_name.value();
|
||||
save_name.value() = ""; // so that it does not appear in the parser section of the state file
|
||||
state.save(file_name);
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
|
@ -164,11 +163,11 @@ int main(int argc, char **argv)
|
|||
{
|
||||
try
|
||||
{
|
||||
the_main(argc, argv);
|
||||
the_main(argc, argv);
|
||||
}
|
||||
catch(std::exception& e)
|
||||
{
|
||||
std::cout << "Exception: " << e.what() << std::endl;
|
||||
std::cout << "Exception: " << e.what() << std::endl;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
#include <utility>
|
||||
|
||||
#include <eo>
|
||||
|
|
@ -13,16 +12,16 @@ class DualSphere : public eoEvalFunc<EOT>
|
|||
public:
|
||||
virtual void operator()( EOT & x )
|
||||
{
|
||||
if( x.invalid() ) { return; }
|
||||
if( x.invalid() ) { return; }
|
||||
|
||||
double sum = 0;
|
||||
int sign = 1;
|
||||
for( unsigned int i=0, s=x.size(); i<s; ++i ) {
|
||||
sum += x[i] * x[i];
|
||||
sign *= x[i]<0 ? -1 : 1;
|
||||
}
|
||||
double sum = 0;
|
||||
int sign = 1;
|
||||
for( unsigned int i=0, s=x.size(); i<s; ++i ) {
|
||||
sum += x[i] * x[i];
|
||||
sign *= x[i]<0 ? -1 : 1;
|
||||
}
|
||||
|
||||
x.fitness( std::make_pair( sum, sign>0 ? true : false ) );
|
||||
x.fitness( std::make_pair( sum, sign>0 ? true : false ) );
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -60,7 +59,7 @@ int main()
|
|||
pop.push_back( sol4 );
|
||||
// on the sphere function everyone has the same fitness of 1
|
||||
if( test(pop, 0) != 0 ) {
|
||||
exit(1);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
pop.erase(pop.begin(),pop.end());
|
||||
|
|
@ -75,7 +74,7 @@ int main()
|
|||
pop.push_back( sol3 );
|
||||
pop.push_back( sol4 );
|
||||
if( test(pop, 1) != 1 ) {
|
||||
exit(1);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// test on a random normal distribution
|
||||
|
|
@ -84,7 +83,6 @@ int main()
|
|||
pop = eoPop<DualVector>( 1000000, init_N );
|
||||
double iqr = test(pop, 1.09);
|
||||
if( iqr < 1.08 || iqr > 1.11 ) {
|
||||
exit(1);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,34 +37,34 @@ int main_function(int argc, char *argv[])
|
|||
eoParser parser(argc, argv); // for user-parameter reading
|
||||
eoState state; // keeps all things allocated
|
||||
eoValueParam<bool>& simpleParam = parser.getORcreateParam(true, "Isotropic",
|
||||
"Isotropic self-adaptive mutation",
|
||||
'i', "ES mutation");
|
||||
"Isotropic self-adaptive mutation",
|
||||
'i', "ES mutation");
|
||||
eoValueParam<bool>& stdevsParam = parser.getORcreateParam(false, "Stdev",
|
||||
"One self-adaptive stDev per variable",
|
||||
's', "ES mutation");
|
||||
"One self-adaptive stDev per variable",
|
||||
's', "ES mutation");
|
||||
eoValueParam<bool>& corrParam = parser.getORcreateParam(false, "Correl",
|
||||
"Use correlated mutations",
|
||||
'c', "ES mutation");
|
||||
"Use correlated mutations",
|
||||
'c', "ES mutation");
|
||||
// Run the appropriate algorithm
|
||||
if (simpleParam.value() == false)
|
||||
{
|
||||
std::cout << "Using eoReal" << std::endl;
|
||||
runAlgorithm(eoReal<FitT>(), parser, state);
|
||||
std::cout << "Using eoReal" << std::endl;
|
||||
runAlgorithm(eoReal<FitT>(), parser, state);
|
||||
}
|
||||
else if (stdevsParam.value() == false)
|
||||
{
|
||||
std::cout << "Using eoEsSimple" << std::endl;
|
||||
runAlgorithm(eoEsSimple<FitT>(), parser, state);
|
||||
std::cout << "Using eoEsSimple" << std::endl;
|
||||
runAlgorithm(eoEsSimple<FitT>(), parser, state);
|
||||
}
|
||||
else if (corrParam.value() == false)
|
||||
{
|
||||
std::cout << "Using eoEsStdev" << std::endl;
|
||||
runAlgorithm(eoEsStdev<FitT>(), parser, state);
|
||||
std::cout << "Using eoEsStdev" << std::endl;
|
||||
runAlgorithm(eoEsStdev<FitT>(), parser, state);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Using eoEsFull" << std::endl;
|
||||
runAlgorithm(eoEsFull<FitT>(), parser, state);
|
||||
std::cout << "Using eoEsFull" << std::endl;
|
||||
runAlgorithm(eoEsFull<FitT>(), parser, state);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -83,11 +83,11 @@ int main(int argc, char **argv)
|
|||
#endif
|
||||
try
|
||||
{
|
||||
main_function(argc, argv);
|
||||
main_function(argc, argv);
|
||||
}
|
||||
catch(std::exception& e)
|
||||
{
|
||||
std::cout << "Exception: " << e.what() << '\n';
|
||||
std::cout << "Exception: " << e.what() << '\n';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ int main_function(int argc, char *argv[])
|
|||
|
||||
// Define Parameters and load them
|
||||
eoValueParam<uint32_t>& seed = parser.createParam(static_cast<uint32_t>(time(0)),
|
||||
"seed", "Random number seed");
|
||||
"seed", "Random number seed");
|
||||
eoValueParam<string>& load_name = parser.createParam(string(), "Load","Load a state file",'L');
|
||||
eoValueParam<string>& save_name = parser.createParam(string(), "Save","Saves a state file",'S');
|
||||
eoValueParam<bool>& stdevs = parser.createParam(false, "Stdev", "Use adaptive mutation rates", 's');
|
||||
|
|
@ -62,23 +62,23 @@ int main_function(int argc, char *argv[])
|
|||
// Run the appropriate algorithm
|
||||
if (stdevs.value() == false && corr.value() == false)
|
||||
{
|
||||
runAlgorithm(eoEsSimple<FitT>() ,parser, state, bounds, load_name);
|
||||
runAlgorithm(eoEsSimple<FitT>() ,parser, state, bounds, load_name);
|
||||
}
|
||||
else if (corr.value() == true)
|
||||
{
|
||||
runAlgorithm(eoEsFull<FitT>(),parser, state, bounds, load_name);
|
||||
runAlgorithm(eoEsFull<FitT>(),parser, state, bounds, load_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
runAlgorithm(eoEsStdev<FitT>(), parser, state, bounds, load_name);
|
||||
runAlgorithm(eoEsStdev<FitT>(), parser, state, bounds, load_name);
|
||||
}
|
||||
|
||||
// and save
|
||||
if (!save_name.value().empty())
|
||||
{
|
||||
string file_name = save_name.value();
|
||||
save_name.value() = ""; // so that it does not appear in the parser section of the state file
|
||||
state.save(file_name);
|
||||
string file_name = save_name.value();
|
||||
save_name.value() = ""; // so that it does not appear in the parser section of the state file
|
||||
state.save(file_name);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
@ -98,11 +98,11 @@ int main(int argc, char **argv)
|
|||
|
||||
try
|
||||
{
|
||||
main_function(argc, argv);
|
||||
main_function(argc, argv);
|
||||
}
|
||||
catch(std::exception& e)
|
||||
{
|
||||
std::cout << "Exception: " << e.what() << '\n';
|
||||
std::cout << "Exception: " << e.what() << '\n';
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
|
@ -120,7 +120,7 @@ void runAlgorithm(EOT, eoParser& _parser, eoState& _state, eoRealVectorBounds& _
|
|||
|
||||
if (lambda_rate.value() < 1.0f)
|
||||
{
|
||||
throw logic_error("lambda_rate must be larger than 1 in a comma strategy");
|
||||
throw logic_error("lambda_rate must be larger than 1 in a comma strategy");
|
||||
}
|
||||
|
||||
// Initialization
|
||||
|
|
@ -137,8 +137,8 @@ void runAlgorithm(EOT, eoParser& _parser, eoState& _state, eoRealVectorBounds& _
|
|||
}
|
||||
else
|
||||
{
|
||||
// evaluate initial population
|
||||
apply<EOT>(eval, pop);
|
||||
// evaluate initial population
|
||||
apply<EOT>(eval, pop);
|
||||
}
|
||||
|
||||
// Ok, time to set up the algorithm
|
||||
|
|
|
|||
|
|
@ -72,4 +72,3 @@ main()
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ double real_value (const Particle & _particle)
|
|||
{
|
||||
double sum = 0;
|
||||
for (unsigned i = 0; i < _particle.size ()-1; i++)
|
||||
sum += pow(_particle[i],2);
|
||||
sum += pow(_particle[i],2);
|
||||
return (sum);
|
||||
}
|
||||
|
||||
|
|
@ -80,24 +80,23 @@ int main()
|
|||
// flight
|
||||
try
|
||||
{
|
||||
pso1(pop);
|
||||
std::cout << "FINAL POPULATION AFTER PSO n°1:" << std::endl;
|
||||
pso1(pop);
|
||||
std::cout << "FINAL POPULATION AFTER PSO n°1:" << std::endl;
|
||||
for (i = 0; i < pop.size(); ++i)
|
||||
std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl;
|
||||
std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl;
|
||||
|
||||
pso2(pop);
|
||||
std::cout << "FINAL POPULATION AFTER PSO n°2:" << std::endl;
|
||||
pso2(pop);
|
||||
std::cout << "FINAL POPULATION AFTER PSO n°2:" << std::endl;
|
||||
for (i = 0; i < pop.size(); ++i)
|
||||
std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl;
|
||||
std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl;
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
std::cout << "exception: " << e.what() << std::endl;;
|
||||
exit(EXIT_FAILURE);
|
||||
std::cout << "exception: " << e.what() << std::endl;;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,11 +66,11 @@ int main(int argc, char **argv)
|
|||
{
|
||||
try
|
||||
{
|
||||
main_function(argc, argv);
|
||||
main_function(argc, argv);
|
||||
}
|
||||
catch(std::exception& e)
|
||||
{
|
||||
std::cout << "Exception: " << e.what() << " in t-eoExtendedVelocity" << std::endl;
|
||||
std::cout << "Exception: " << e.what() << " in t-eoExtendedVelocity" << std::endl;
|
||||
}
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,9 +61,9 @@ bool UserDefMutate(UserDefStruct& a)
|
|||
a = RandomStruct(); // just for testing
|
||||
|
||||
if (rng.flip(0.1f))
|
||||
a.d = UserDefStruct::test;
|
||||
a.d = UserDefStruct::test;
|
||||
else
|
||||
a.d = UserDefStruct::another;
|
||||
a.d = UserDefStruct::another;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -72,13 +72,13 @@ bool UserDefBinCrossover(UserDefStruct& a, const UserDefStruct& b)
|
|||
std::cout << "UserDefBinCrossover\n";
|
||||
|
||||
if (rng.flip(0.5))
|
||||
a.a = b.a;
|
||||
a.a = b.a;
|
||||
if (rng.flip(0.5))
|
||||
a.b = b.b;
|
||||
a.b = b.b;
|
||||
if (rng.flip(0.5))
|
||||
a.c = b.c;
|
||||
a.c = b.c;
|
||||
if (rng.flip(0.5))
|
||||
a.d = b.d;
|
||||
a.d = b.d;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -86,13 +86,13 @@ bool UserDefQuadCrossover(UserDefStruct& a, UserDefStruct& b)
|
|||
{
|
||||
std::cout << "UserDefQuadCrossover\n";
|
||||
if (rng.flip(0.5))
|
||||
swap(a.a, b.a);
|
||||
swap(a.a, b.a);
|
||||
if (rng.flip(0.5))
|
||||
swap(a.b, b.b);
|
||||
swap(a.b, b.b);
|
||||
if (rng.flip(0.5))
|
||||
swap(a.c, b.c);
|
||||
swap(a.c, b.c);
|
||||
if (rng.flip(0.5))
|
||||
swap(a.d, b.d);
|
||||
swap(a.d, b.d);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,8 +22,8 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: todos@geneura.ugr.es, http://geneura.ugr.es
|
||||
Marc.Schoenauer@inria.fr
|
||||
mak@dhi.dk
|
||||
Marc.Schoenauer@inria.fr
|
||||
mak@dhi.dk
|
||||
*/
|
||||
//-----------------------------------------------------------------------------
|
||||
#include <iostream>
|
||||
|
|
@ -102,4 +102,3 @@ int main(){
|
|||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,8 +22,8 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: todos@geneura.ugr.es, http://geneura.ugr.es
|
||||
Marc.Schoenauer@inria.fr
|
||||
mak@dhi.dk
|
||||
Marc.Schoenauer@inria.fr
|
||||
mak@dhi.dk
|
||||
*/
|
||||
//-----------------------------------------------------------------------------
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
|
@ -41,7 +41,7 @@
|
|||
#include <es/eoReal.h> // Definition of representation
|
||||
#include <es/eoRealInitBounded.h> // Uniformly initializes real vector in bounds
|
||||
#include <es/make_genotype_real.h> // Initialization of a genotype
|
||||
#include <eoEvalFunc.h> // Base class for fitness evaluation
|
||||
#include <eoEvalFunc.h> // Base class for fitness evaluation
|
||||
#include <es/make_op_real.h> // Variation operators using standard Real operators
|
||||
#include <eoScalarFitnessAssembled.h> // The fitness class
|
||||
typedef eoReal<eoAssembledMinimizingFitness> Indi;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
#include <eoInit.h>
|
||||
#include <eoCounter.h>
|
||||
|
||||
|
|
@ -13,7 +12,7 @@ class Tester : public eoInit<int>
|
|||
public :
|
||||
void operator()(int& i)
|
||||
{
|
||||
i=1;
|
||||
i=1;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: mkeijzer@dhi.dk
|
||||
Marc.Schoenauer@polytechnique.fr
|
||||
Marc.Schoenauer@polytechnique.fr
|
||||
*/
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
|
@ -38,10 +38,10 @@ struct Dummy : public EO<double>
|
|||
Dummy(std::string _s="") : s(_s) {}
|
||||
|
||||
void printOn(std::ostream & _os) const
|
||||
{
|
||||
EO<double>::printOn(_os);
|
||||
_os << " - " << s ;
|
||||
}
|
||||
{
|
||||
EO<double>::printOn(_os);
|
||||
_os << " - " << s ;
|
||||
}
|
||||
|
||||
std::string s;
|
||||
};
|
||||
|
|
@ -179,9 +179,9 @@ void init(eoPop<Dummy> & _pop, unsigned _pSize)
|
|||
for (unsigned i=0; i<_pSize; i++)
|
||||
{
|
||||
std::ostringstream os;
|
||||
os << i;
|
||||
_pop[i] = Dummy(os.str());
|
||||
_pop[i].fitness(i);
|
||||
os << i;
|
||||
_pop[i] = Dummy(os.str());
|
||||
_pop[i].fitness(i);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -190,7 +190,7 @@ int the_main(int argc, char **argv)
|
|||
{
|
||||
eoParser parser(argc, argv);
|
||||
eoValueParam<unsigned int> parentSizeParam(
|
||||
parser.createParam(unsigned(10), "parentSize", "Parent size",'P'));
|
||||
parser.createParam(unsigned(10), "parentSize", "Parent size",'P'));
|
||||
pSize = parentSizeParam.value(); // global variable
|
||||
|
||||
eoValueParam<uint32_t> seedParam(time(0), "seed", "Random number seed", 'S');
|
||||
|
|
@ -201,8 +201,8 @@ int the_main(int argc, char **argv)
|
|||
// i.e. in case you need parameters somewhere else, postpone these
|
||||
if (parser.userNeedsHelp())
|
||||
{
|
||||
parser.printHelp(std::cout);
|
||||
exit(1);
|
||||
parser.printHelp(std::cout);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
////////////////////////////////// define operators
|
||||
|
|
@ -379,11 +379,11 @@ int main(int argc, char **argv)
|
|||
{
|
||||
try
|
||||
{
|
||||
the_main(argc, argv);
|
||||
the_main(argc, argv);
|
||||
}
|
||||
catch(std::exception& e)
|
||||
{
|
||||
std::cout << "Exception: " << e.what() << std::endl;
|
||||
std::cout << "Exception: " << e.what() << std::endl;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
#include <eo>
|
||||
#include <es.h>
|
||||
#include <utils/eoStat.h>
|
||||
|
|
@ -39,7 +38,7 @@ int main()
|
|||
pop.push_back( sol4 );
|
||||
// on the sphere function everyone has the same fitness of 1
|
||||
if( test(pop, 0) != 0 ) {
|
||||
exit(1);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
pop.erase(pop.begin(),pop.end());
|
||||
|
|
@ -54,7 +53,7 @@ int main()
|
|||
pop.push_back( sol3 );
|
||||
pop.push_back( sol4 );
|
||||
if( test(pop, 1) != 1 ) {
|
||||
exit(1);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// test on a random normal distribution
|
||||
|
|
@ -63,7 +62,6 @@ int main()
|
|||
pop = eoPop<realVec>( 1000000, init_N );
|
||||
double iqr = test(pop, 1.09);
|
||||
if( iqr < 1.08 || iqr > 1.11 ) {
|
||||
exit(1);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -98,14 +98,14 @@ int main(int argc, char* argv[])
|
|||
|
||||
// now create the snapshot monitor
|
||||
eoValueParam<bool>& plotDistribParam = parser.getORcreateParam(false, "plotDistrib",
|
||||
"Plot Distribution", '\0',
|
||||
"Output - Graphical");
|
||||
"Plot Distribution", '\0',
|
||||
"Output - Graphical");
|
||||
if (plotDistribParam.value())
|
||||
{
|
||||
#ifdef HAVE_GNUPLOT
|
||||
unsigned frequency=1; // frequency of plots updates
|
||||
eoGnuplot1DSnapshot *distribSnapshot = new eoGnuplot1DSnapshot(ptDirNameParam->value(),
|
||||
frequency, "distrib");
|
||||
frequency, "distrib");
|
||||
state.storeFunctor(distribSnapshot);
|
||||
// add the distribution (it is an eoValueParam<vector<double> >)
|
||||
distribSnapshot->add(distrib);
|
||||
|
|
@ -117,7 +117,7 @@ int main(int argc, char* argv[])
|
|||
// the algorithm: EDA
|
||||
// don't know where else to put the population size!
|
||||
unsigned popSize = parser.getORcreateParam(unsigned(100), "popSize",
|
||||
"Population Size", 'P', "Algorithm").value();
|
||||
"Population Size", 'P', "Algorithm").value();
|
||||
eoSimpleEDA<Indi> eda(update, eval, popSize, checkpoint);
|
||||
|
||||
///// End of construction of the algorith
|
||||
|
|
|
|||
|
|
@ -24,21 +24,21 @@ int main()
|
|||
double sigma(5.);
|
||||
double sum(0.);
|
||||
for(size_t i=0; i<num; ++i)
|
||||
sum += abs(rng.normal(sigma));
|
||||
sum += abs(rng.normal(sigma));
|
||||
sum /= double(num);
|
||||
if(sum > sigma / 0.68) {
|
||||
cerr << "Normal distribution seems out of bounds; "
|
||||
<< "rerun to make sure it wasn't a statistical outlier" << endl;
|
||||
return -1;
|
||||
cerr << "Normal distribution seems out of bounds; "
|
||||
<< "rerun to make sure it wasn't a statistical outlier" << endl;
|
||||
return -1;
|
||||
}
|
||||
sum = 0.;
|
||||
for(size_t i=0; i<num; ++i)
|
||||
sum += abs(rng.normal(mean, sigma) - mean);
|
||||
sum += abs(rng.normal(mean, sigma) - mean);
|
||||
sum /= double(num);
|
||||
if(sum > sigma / 0.68) {
|
||||
cerr << "Normal distribution seems out of bounds; "
|
||||
<< "rerun to make sure it wasn't a statistical outlier" << endl;
|
||||
return -1;
|
||||
cerr << "Normal distribution seems out of bounds; "
|
||||
<< "rerun to make sure it wasn't a statistical outlier" << endl;
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ int main(int argc, char* argv[])
|
|||
|
||||
// The evaluation fn - encapsulated into an eval counter for output
|
||||
eoEvalFuncPtr<EOT, double, const std::vector<double>&>
|
||||
mainEval( real_value );
|
||||
mainEval( real_value );
|
||||
eoEvalFuncCounter<EOT> eval(mainEval);
|
||||
|
||||
// the genotype - through a genotype initializer
|
||||
|
|
|
|||
|
|
@ -73,8 +73,8 @@ int the_main(int argc, char **argv)
|
|||
|
||||
if (parser.userNeedsHelp())
|
||||
{
|
||||
parser.printHelp(std::cout);
|
||||
exit(1);
|
||||
parser.printHelp(std::cout);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
unsigned i;
|
||||
|
|
@ -213,11 +213,11 @@ int main(int argc, char **argv)
|
|||
{
|
||||
try
|
||||
{
|
||||
the_main(argc, argv);
|
||||
the_main(argc, argv);
|
||||
}
|
||||
catch(std::exception& e)
|
||||
{
|
||||
std::cout << "Exception: " << e.what() << std::endl;
|
||||
std::cout << "Exception: " << e.what() << std::endl;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,11 +57,11 @@ int main(int argc, char **argv)
|
|||
{
|
||||
try
|
||||
{
|
||||
main_function(argc, argv);
|
||||
main_function(argc, argv);
|
||||
}
|
||||
catch(std::exception& e)
|
||||
{
|
||||
std::cout << "Exception: " << e.what() << " in t-eoRingTopology" << std::endl;
|
||||
std::cout << "Exception: " << e.what() << " in t-eoRingTopology" << std::endl;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
#include <eoPop.h>
|
||||
#include <EO.h>
|
||||
#include <eoProportionalSelect.h>
|
||||
|
|
@ -65,4 +64,3 @@ int main()
|
|||
|
||||
return test_select<eoStochasticUniversalSelect<TestEO> >();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
|
@ -29,5 +28,3 @@ int main() {
|
|||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -121,8 +121,8 @@ eoValueParam<unsigned> tournamentSizeParam = parser.createParam(unsigned(2), "to
|
|||
|
||||
if (parser.userNeedsHelp())
|
||||
{
|
||||
parser.printHelp(std::cout);
|
||||
exit(0);
|
||||
parser.printHelp(std::cout);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
// hard-coded directory name ...
|
||||
|
|
@ -155,7 +155,7 @@ eoValueParam<unsigned> tournamentSizeParam = parser.createParam(unsigned(2), "to
|
|||
|
||||
// random seed
|
||||
eoValueParam<uint32_t>& seedParam = parser.createParam(uint32_t(0), "seed",
|
||||
"Random number seed", 'S');
|
||||
"Random number seed", 'S');
|
||||
if (seedParam.value() == 0)
|
||||
seedParam.value() = time(0);
|
||||
rng.reseed(seedParam.value());
|
||||
|
|
@ -212,11 +212,11 @@ int main(int argc, char **argv)
|
|||
{
|
||||
try
|
||||
{
|
||||
the_main(argc, argv);
|
||||
the_main(argc, argv);
|
||||
}
|
||||
catch(std::exception& e)
|
||||
{
|
||||
std::cout << "Exception: " << e.what() << std::endl;
|
||||
return 1;
|
||||
std::cout << "Exception: " << e.what() << std::endl;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -230,11 +230,11 @@ int main(int argc, char **argv)
|
|||
{
|
||||
try
|
||||
{
|
||||
the_main(argc, argv);
|
||||
the_main(argc, argv);
|
||||
}
|
||||
catch(std::exception& e)
|
||||
{
|
||||
std::cout << "Exception: " << e.what() << std::endl;
|
||||
return 1;
|
||||
std::cout << "Exception: " << e.what() << std::endl;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,22 +89,22 @@ int the_main(int argc, char **argv)
|
|||
|
||||
if (parser.userNeedsHelp())
|
||||
{
|
||||
parser.printHelp(std::cout);
|
||||
return 0;
|
||||
parser.printHelp(std::cout);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Either load or initialize
|
||||
if (load_name.value() != "")
|
||||
{
|
||||
state.load(load_name.value()); // load the rest
|
||||
state.load(load_name.value()); // load the rest
|
||||
}
|
||||
else
|
||||
{
|
||||
// else
|
||||
// else
|
||||
|
||||
// initialize rng and population
|
||||
// initialize rng and population
|
||||
|
||||
rng.reseed(seed.value());
|
||||
rng.reseed(seed.value());
|
||||
}
|
||||
|
||||
// run the algorithm
|
||||
|
|
@ -112,13 +112,13 @@ int the_main(int argc, char **argv)
|
|||
// Save when needed
|
||||
if (save_name.value() != "")
|
||||
{
|
||||
std::string file_name = save_name.value();
|
||||
save_name.value() = ""; // so that it does not appear in the parser section of the state file
|
||||
state.save(file_name);
|
||||
std::string file_name = save_name.value();
|
||||
save_name.value() = ""; // so that it does not appear in the parser section of the state file
|
||||
state.save(file_name);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 100; ++i)
|
||||
rng.rand();
|
||||
rng.rand();
|
||||
|
||||
std::cout << "a random number is " << rng.random(1024) << std::endl;;
|
||||
|
||||
|
|
@ -129,11 +129,11 @@ int main(int argc, char **argv)
|
|||
{
|
||||
try
|
||||
{
|
||||
the_main(argc, argv);
|
||||
the_main(argc, argv);
|
||||
}
|
||||
catch(std::exception& e)
|
||||
{
|
||||
std::cout << "Exception: " << e.what() << std::endl;
|
||||
std::cout << "Exception: " << e.what() << std::endl;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,57 +23,57 @@ public :
|
|||
// arity function, need this function!
|
||||
int arity() const { return op == X? 0 : 2; }
|
||||
|
||||
void randomize() {}
|
||||
void randomize() {}
|
||||
|
||||
// evaluation function, single case, using first argument to give value of variable
|
||||
template <class Children>
|
||||
void operator()(double& result, Children args, double var) const
|
||||
{
|
||||
double r1(0.), r2(0.);
|
||||
if (arity() == 2)
|
||||
{
|
||||
args[0].apply(r1, var);
|
||||
args[1].apply(r2, var);
|
||||
}
|
||||
switch (op)
|
||||
{
|
||||
case Plus : result = r1 + r2; break;
|
||||
case Min : result = r1 - r2; break;
|
||||
case Mult : result = r1 * r2; break;
|
||||
case PDiv : {
|
||||
if (r2 == 0.0)
|
||||
// protection a la Koza, realistic implementations
|
||||
// should maybe throw an exception
|
||||
result = 1.0;
|
||||
else
|
||||
result = r1 / r2;
|
||||
break;
|
||||
}
|
||||
case X : result = var; break;
|
||||
}
|
||||
double r1(0.), r2(0.);
|
||||
if (arity() == 2)
|
||||
{
|
||||
args[0].apply(r1, var);
|
||||
args[1].apply(r2, var);
|
||||
}
|
||||
switch (op)
|
||||
{
|
||||
case Plus : result = r1 + r2; break;
|
||||
case Min : result = r1 - r2; break;
|
||||
case Mult : result = r1 * r2; break;
|
||||
case PDiv : {
|
||||
if (r2 == 0.0)
|
||||
// protection a la Koza, realistic implementations
|
||||
// should maybe throw an exception
|
||||
result = 1.0;
|
||||
else
|
||||
result = r1 / r2;
|
||||
break;
|
||||
}
|
||||
case X : result = var; break;
|
||||
}
|
||||
}
|
||||
|
||||
/// 'Pretty' print to ostream function
|
||||
template <class Children>
|
||||
void operator()(string& result, Children args) const
|
||||
void operator()(string& result, Children args) const
|
||||
{
|
||||
static const string lb = "(";
|
||||
static const string rb = ")";
|
||||
char opStr[4] = " ";
|
||||
opStr[1] = op;
|
||||
static const string lb = "(";
|
||||
static const string rb = ")";
|
||||
char opStr[4] = " ";
|
||||
opStr[1] = op;
|
||||
|
||||
if (arity() == 0)
|
||||
{
|
||||
result = "x";
|
||||
return;
|
||||
}
|
||||
// else
|
||||
string r1;
|
||||
args[0].apply(r1);
|
||||
result = lb + r1;
|
||||
result += opStr;
|
||||
args[1].apply(r1);
|
||||
result += r1 + rb;
|
||||
result = "x";
|
||||
return;
|
||||
}
|
||||
// else
|
||||
string r1;
|
||||
args[0].apply(r1);
|
||||
result = lb + r1;
|
||||
result += opStr;
|
||||
args[1].apply(r1);
|
||||
result += r1 + rb;
|
||||
}
|
||||
|
||||
Operator getOp() const { return op; }
|
||||
|
|
@ -99,7 +99,7 @@ static SymregNode init_sequence[5] = {SymregNode::X, SymregNode::Plus, SymregNod
|
|||
// template <>
|
||||
// bool lt_arity(const SymregNode &node1, const SymregNode &node2)
|
||||
// {
|
||||
// return (node1.arity() < node2.arity());
|
||||
// return (node1.arity() < node2.arity());
|
||||
// }
|
||||
// #endif
|
||||
|
||||
|
|
@ -166,16 +166,16 @@ public :
|
|||
vector<double> outputs;
|
||||
outputs.resize(inputs.size());
|
||||
|
||||
double fitness = 0.0;
|
||||
double fitness = 0.0;
|
||||
|
||||
for (unsigned i = 0; i < inputs.size(); ++i)
|
||||
{
|
||||
{
|
||||
_eo.apply(outputs[i], inputs[i]);
|
||||
fitness += (outputs[i] - target[i]) * (outputs[i] - target[i]);
|
||||
}
|
||||
fitness += (outputs[i] - target[i]) * (outputs[i] - target[i]);
|
||||
}
|
||||
|
||||
fitness /= (double) target.size();
|
||||
fitness = sqrt(fitness);
|
||||
fitness /= (double) target.size();
|
||||
fitness = sqrt(fitness);
|
||||
|
||||
if (fitness > 1e+20)
|
||||
fitness = 1e+20;
|
||||
|
|
@ -197,11 +197,11 @@ void print_best(eoPop<EOT>& pop)
|
|||
|
||||
for (unsigned i = 1; i < pop.size(); ++i)
|
||||
{
|
||||
if (best < pop[i].fitness())
|
||||
{
|
||||
best = pop[i].fitness();
|
||||
index = i;
|
||||
}
|
||||
if (best < pop[i].fitness())
|
||||
{
|
||||
best = pop[i].fitness();
|
||||
index = i;
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << "\t";
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ double real_value (const Particle & _particle)
|
|||
{
|
||||
double sum = 0;
|
||||
for (unsigned i = 0; i < _particle.size ()-1; i++)
|
||||
sum += pow(_particle[i],2);
|
||||
sum += pow(_particle[i],2);
|
||||
return (sum);
|
||||
}
|
||||
|
||||
|
|
@ -80,20 +80,20 @@ int main()
|
|||
// flight
|
||||
try
|
||||
{
|
||||
pso1(pop);
|
||||
std::cout << "FINAL POPULATION AFTER SYNC PSO n°1:" << std::endl;
|
||||
pso1(pop);
|
||||
std::cout << "FINAL POPULATION AFTER SYNC PSO n°1:" << std::endl;
|
||||
for (i = 0; i < pop.size(); ++i)
|
||||
std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl;
|
||||
std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl;
|
||||
|
||||
pso2(pop);
|
||||
std::cout << "FINAL POPULATION AFTER SYNC PSO n°2:" << std::endl;
|
||||
pso2(pop);
|
||||
std::cout << "FINAL POPULATION AFTER SYNC PSO n°2:" << std::endl;
|
||||
for (i = 0; i < pop.size(); ++i)
|
||||
std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl;
|
||||
std::cout << "\t" << pop[i] << " " << pop[i].fitness() << std::endl;
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
std::cout << "exception: " << e.what() << std::endl;;
|
||||
exit(EXIT_FAILURE);
|
||||
std::cout << "exception: " << e.what() << std::endl;;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -74,4 +74,3 @@ int main()
|
|||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -208,11 +208,11 @@ int main()
|
|||
|
||||
try
|
||||
{
|
||||
main_function();
|
||||
main_function();
|
||||
}
|
||||
catch(std::exception& e)
|
||||
{
|
||||
std::cout << "Exception: " << e.what() << '\n';
|
||||
std::cout << "Exception: " << e.what() << '\n';
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,4 +87,3 @@ int main()
|
|||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -27,10 +27,10 @@ import optparse, logging, sys, os
|
|||
from datetime import datetime
|
||||
|
||||
LEVELS = {'debug': logging.DEBUG,
|
||||
'info': logging.INFO,
|
||||
'warning': logging.WARNING,
|
||||
'error': logging.ERROR,
|
||||
'critical': logging.CRITICAL}
|
||||
'info': logging.INFO,
|
||||
'warning': logging.WARNING,
|
||||
'error': logging.ERROR,
|
||||
'critical': logging.CRITICAL}
|
||||
|
||||
LOG_DEFAULT_FILENAME='notitle.log'
|
||||
|
||||
|
|
@ -68,10 +68,10 @@ def parser(parser=optparse.OptionParser()):
|
|||
|
||||
def logger(level_name, filename=LOG_DEFAULT_FILENAME):
|
||||
logging.basicConfig(
|
||||
level=logging.DEBUG,
|
||||
format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s',
|
||||
filename=filename, filemode='a'
|
||||
)
|
||||
level=logging.DEBUG,
|
||||
format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s',
|
||||
filename=filename, filemode='a'
|
||||
)
|
||||
|
||||
console = logging.StreamHandler()
|
||||
console.setLevel(LEVELS.get(level_name, logging.NOTSET))
|
||||
|
|
@ -85,45 +85,45 @@ if not options.onlyexecute:
|
|||
|
||||
def get_boxplot_data( filename ):
|
||||
try:
|
||||
f = open( filename )
|
||||
return [ [ float(value) for value in line.split() ] for line in f.readlines() ]
|
||||
f = open( filename )
|
||||
return [ [ float(value) for value in line.split() ] for line in f.readlines() ]
|
||||
except:
|
||||
raise ValueError('got an issue during the reading of file %s' % filename)
|
||||
raise ValueError('got an issue during the reading of file %s' % filename)
|
||||
|
||||
def do_measure( name, p, ps, P, d, ds, D, r=options.nRun, s=options.seed, v='logging' ):
|
||||
OPENMP_EXEC_FORMAT='./test/t-openmp -p=%d --popStep=%d -P=%d -d=%d --dimStep=%d -D=%d -r=%d --seed=%d -v=%s -H=%s -C=%d -V=%d'
|
||||
|
||||
pwd = options.topic + name + '_'
|
||||
cmd = OPENMP_EXEC_FORMAT % (p, ps, P, d, ds, D, r, s, v, pwd,
|
||||
0 if options.onlyVarTime else 1,
|
||||
0 if options.onlyConstTime else 1)
|
||||
0 if options.onlyVarTime else 1,
|
||||
0 if options.onlyConstTime else 1)
|
||||
logging.info( cmd )
|
||||
if not options.onlyprint:
|
||||
os.system( cmd )
|
||||
os.system( cmd )
|
||||
|
||||
if not options.onlyexecute:
|
||||
def generate( filenames ):
|
||||
for cur in filenames:
|
||||
filename = RESULT_FILE_FORMAT % (pwd, cur, p, ps, P, d, ds, D, r, s)
|
||||
pylab.boxplot( get_boxplot_data( filename ) )
|
||||
nonzero = lambda x: x if x > 0 else 1
|
||||
iters = ( nonzero( P - p ) / ps ) * ( nonzero( D - d ) / ds )
|
||||
pylab.xlabel('%d iterations from %d,%d to %d,%d' % ( iters, p, d, P, D) )
|
||||
pylab.ylabel('%s - %s' % (cur, name))
|
||||
pylab.savefig( filename + '.pdf', format='pdf' )
|
||||
pylab.savefig( filename + '.png', format='png' )
|
||||
pylab.cla()
|
||||
pylab.clf()
|
||||
def generate( filenames ):
|
||||
for cur in filenames:
|
||||
filename = RESULT_FILE_FORMAT % (pwd, cur, p, ps, P, d, ds, D, r, s)
|
||||
pylab.boxplot( get_boxplot_data( filename ) )
|
||||
nonzero = lambda x: x if x > 0 else 1
|
||||
iters = ( nonzero( P - p ) / ps ) * ( nonzero( D - d ) / ds )
|
||||
pylab.xlabel('%d iterations from %d,%d to %d,%d' % ( iters, p, d, P, D) )
|
||||
pylab.ylabel('%s - %s' % (cur, name))
|
||||
pylab.savefig( filename + '.pdf', format='pdf' )
|
||||
pylab.savefig( filename + '.png', format='png' )
|
||||
pylab.cla()
|
||||
pylab.clf()
|
||||
|
||||
if not options.onlyVarTime:
|
||||
generate( ['speedup', 'efficiency', 'dynamicity'] )
|
||||
if not options.onlyConstTime:
|
||||
generate( ['variable_speedup', 'variable_efficiency', 'variable_dynamicity'] )
|
||||
if not options.onlyVarTime:
|
||||
generate( ['speedup', 'efficiency', 'dynamicity'] )
|
||||
if not options.onlyConstTime:
|
||||
generate( ['variable_speedup', 'variable_efficiency', 'variable_dynamicity'] )
|
||||
|
||||
def main():
|
||||
if not options.onlyprint:
|
||||
logging.info('creates first the new topic repository %s', options.topic)
|
||||
os.mkdir( options.topic )
|
||||
logging.info('creates first the new topic repository %s', options.topic)
|
||||
os.mkdir( options.topic )
|
||||
|
||||
logging.info('do all tests with r = %d and a common seed value = %d' % (options.nRun, options.seed))
|
||||
|
||||
|
|
@ -133,24 +133,24 @@ def main():
|
|||
F = options.fixedBound
|
||||
|
||||
if options.measure is None or 1 in options.measure:
|
||||
logging.info('(1) measure for all combinaisons of P n D')
|
||||
do_measure( '1', 1*n, 10*n, 101*n, 1*n, 10*n, 101*n )
|
||||
logging.info('(1) measure for all combinaisons of P n D')
|
||||
do_measure( '1', 1*n, 10*n, 101*n, 1*n, 10*n, 101*n )
|
||||
|
||||
if options.measure is None or 2 in options.measure:
|
||||
logging.info('(2) measure for P \in [%d, %d[ with D fixed to %d' % (1*n, 101*n, F))
|
||||
do_measure( '2', 1*n, 1*n, 101*n, F, 1, F )
|
||||
logging.info('(2) measure for P \in [%d, %d[ with D fixed to %d' % (1*n, 101*n, F))
|
||||
do_measure( '2', 1*n, 1*n, 101*n, F, 1, F )
|
||||
|
||||
if options.measure is None or 3 in options.measure:
|
||||
logging.info('(3) measure for P \in [%d, %d[ with ps = %d and D fixed to %d' % (1*n, 1001*n, 10*n, F))
|
||||
do_measure( '3', 1*n, 10*n, 1001*n, F, 1, F )
|
||||
logging.info('(3) measure for P \in [%d, %d[ with ps = %d and D fixed to %d' % (1*n, 1001*n, 10*n, F))
|
||||
do_measure( '3', 1*n, 10*n, 1001*n, F, 1, F )
|
||||
|
||||
if options.measure is None or 4 in options.measure:
|
||||
logging.info('(4) measure for D \in [%d, %d[ with P fixed to %d' % (1*n, 101*n, F))
|
||||
do_measure( '4', F, 1, F, 1*n, 1*n, 101*n )
|
||||
logging.info('(4) measure for D \in [%d, %d[ with P fixed to %d' % (1*n, 101*n, F))
|
||||
do_measure( '4', F, 1, F, 1*n, 1*n, 101*n )
|
||||
|
||||
if options.measure is None or 5 in options.measure:
|
||||
logging.info('(5) measure for D \in [%d, %d[ with ds = %d and P fixed to %d' % (1*n, 1001*n, 10*n, F))
|
||||
do_measure( '5', F, 1, F, 1*n, 10*n, 1001*n )
|
||||
logging.info('(5) measure for D \in [%d, %d[ with ds = %d and P fixed to %d' % (1*n, 1001*n, 10*n, F))
|
||||
do_measure( '5', F, 1, F, 1*n, 10*n, 1001*n )
|
||||
|
||||
# when executed, just run main():
|
||||
if __name__ == '__main__':
|
||||
|
|
|
|||
|
|
@ -78,10 +78,10 @@ void main_function(int argc, char **argv)
|
|||
{
|
||||
Indi v; // void individual, to be filled
|
||||
for (unsigned ivar=0; ivar<VEC_SIZE; ivar++)
|
||||
{
|
||||
bool r = rng.flip(); // new value, random in {0,1}
|
||||
v.push_back(r); // append that random value to v
|
||||
}
|
||||
{
|
||||
bool r = rng.flip(); // new value, random in {0,1}
|
||||
v.push_back(r); // append that random value to v
|
||||
}
|
||||
eval(v); // evaluate it
|
||||
pop.push_back(v); // and put it in the population
|
||||
}
|
||||
|
|
@ -138,7 +138,7 @@ void main_function(int argc, char **argv)
|
|||
|
||||
|
||||
eoSGA<Indi> gga(select, xover, CROSS_RATE, mutation, MUT_RATE,
|
||||
eval, continuator);
|
||||
eval, continuator);
|
||||
|
||||
// Apply algo to pop - that's it!
|
||||
gga(pop);
|
||||
|
|
@ -156,11 +156,11 @@ int main(int argc, char **argv)
|
|||
|
||||
try
|
||||
{
|
||||
main_function(argc, argv);
|
||||
main_function(argc, argv);
|
||||
}
|
||||
catch(exception& e)
|
||||
{
|
||||
cout << "Exception: " << e.what() << '\n';
|
||||
cout << "Exception: " << e.what() << '\n';
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
|
|
|||
|
|
@ -78,10 +78,10 @@ void main_function(int argc, char **argv)
|
|||
{
|
||||
Indi v; // void individual, to be filled
|
||||
for (unsigned ivar=0; ivar<VEC_SIZE; ivar++)
|
||||
{
|
||||
double r = 2*rng.uniform() - 1; // new value, random in [-1,1)
|
||||
v.push_back(r); // append that random value to v
|
||||
}
|
||||
{
|
||||
double r = 2*rng.uniform() - 1; // new value, random in [-1,1)
|
||||
v.push_back(r); // append that random value to v
|
||||
}
|
||||
eval(v); // evaluate it
|
||||
pop.push_back(v); // and put it in the population
|
||||
}
|
||||
|
|
@ -133,7 +133,7 @@ void main_function(int argc, char **argv)
|
|||
|
||||
|
||||
eoSGA<Indi> gga(select, xover, CROSS_RATE, mutation, MUT_RATE,
|
||||
eval, continuator);
|
||||
eval, continuator);
|
||||
|
||||
// Apply algo to pop - that's it!
|
||||
gga(pop);
|
||||
|
|
@ -151,11 +151,11 @@ int main(int argc, char **argv)
|
|||
{
|
||||
try
|
||||
{
|
||||
main_function(argc, argv);
|
||||
main_function(argc, argv);
|
||||
}
|
||||
catch(exception& e)
|
||||
{
|
||||
cout << "Exception: " << e.what() << '\n';
|
||||
cout << "Exception: " << e.what() << '\n';
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Include the corresponding file
|
||||
#include <ga.h> // bitstring representation & operators
|
||||
#include <ga.h> // bitstring representation & operators
|
||||
// define your individuals
|
||||
typedef eoBit<double> Indi; // A bitstring with fitness double
|
||||
|
||||
|
|
@ -151,11 +151,11 @@ int main(int argc, char **argv)
|
|||
|
||||
try
|
||||
{
|
||||
main_function(argc, argv);
|
||||
main_function(argc, argv);
|
||||
}
|
||||
catch(exception& e)
|
||||
{
|
||||
cout << "Exception: " << e.what() << '\n';
|
||||
cout << "Exception: " << e.what() << '\n';
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
|
|
|||
|
|
@ -182,11 +182,11 @@ int main(int argc, char **argv)
|
|||
|
||||
try
|
||||
{
|
||||
main_function(argc, argv);
|
||||
main_function(argc, argv);
|
||||
}
|
||||
catch(exception& e)
|
||||
{
|
||||
cout << "Exception: " << e.what() << '\n';
|
||||
cout << "Exception: " << e.what() << '\n';
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ void main_function(int argc, char **argv)
|
|||
const float P_MUT = 0.5; // mutation probability
|
||||
|
||||
const double EPSILON = 0.01; // range for real uniform mutation
|
||||
double SIGMA = 0.3; // std dev. for normal mutation
|
||||
double SIGMA = 0.3; // std dev. for normal mutation
|
||||
// some parameters for chosing among different operators
|
||||
const double hypercubeRate = 0.5; // relative weight for hypercube Xover
|
||||
const double segmentRate = 0.5; // relative weight for segment Xover
|
||||
|
|
@ -181,11 +181,11 @@ int main(int argc, char **argv)
|
|||
{
|
||||
try
|
||||
{
|
||||
main_function(argc, argv);
|
||||
main_function(argc, argv);
|
||||
}
|
||||
catch(exception& e)
|
||||
{
|
||||
cout << "Exception: " << e.what() << '\n';
|
||||
cout << "Exception: " << e.what() << '\n';
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
|
|
|||
|
|
@ -14,4 +14,3 @@ double binary_value(const std::vector<bool>& _chrom)
|
|||
sum += _chrom[i];
|
||||
return sum;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
// REPRESENTATION
|
||||
//-----------------------------------------------------------------------------
|
||||
// Include the corresponding file
|
||||
#include <ga.h> // bitstring representation & operators
|
||||
#include <ga.h> // bitstring representation & operators
|
||||
// define your individuals
|
||||
typedef eoBit<double> Indi; // A bitstring with fitness double
|
||||
|
||||
|
|
@ -186,11 +186,11 @@ int main(int argc, char **argv)
|
|||
{
|
||||
try
|
||||
{
|
||||
main_function(argc, argv);
|
||||
main_function(argc, argv);
|
||||
}
|
||||
catch(exception& e)
|
||||
{
|
||||
cout << "Exception: " << e.what() << '\n';
|
||||
cout << "Exception: " << e.what() << '\n';
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
|
|
|||
|
|
@ -15,6 +15,3 @@ double real_value(const std::vector<double>& _ind)
|
|||
}
|
||||
return -sum;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -62,4 +62,3 @@ INSTALL(TARGETS SecondRealEA RUNTIME DESTINATION share/eo/examples/Lesson3 COMPO
|
|||
INSTALL(TARGETS exercise3.1 RUNTIME DESTINATION share/eo/examples/Lesson3 COMPONENT examples)
|
||||
|
||||
######################################################################################
|
||||
|
||||
|
|
|
|||
|
|
@ -126,8 +126,8 @@ void main_function(int argc, char **argv)
|
|||
// i.e. in case you need parameters somewhere else, postpone these
|
||||
if (parser.userNeedsHelp())
|
||||
{
|
||||
parser.printHelp(cout);
|
||||
exit(1);
|
||||
parser.printHelp(cout);
|
||||
exit(1);
|
||||
}
|
||||
if (statusParam.value() != "")
|
||||
{
|
||||
|
|
@ -337,11 +337,11 @@ int main(int argc, char **argv)
|
|||
{
|
||||
try
|
||||
{
|
||||
main_function(argc, argv);
|
||||
main_function(argc, argv);
|
||||
}
|
||||
catch(exception& e)
|
||||
{
|
||||
cout << "Exception: " << e.what() << '\n';
|
||||
cout << "Exception: " << e.what() << '\n';
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
|
|
|||
|
|
@ -104,8 +104,8 @@ void main_function(int argc, char **argv)
|
|||
// i.e. in case you need parameters somewhere else, postpone these
|
||||
if (parser.userNeedsHelp())
|
||||
{
|
||||
parser.printHelp(cout);
|
||||
exit(1);
|
||||
parser.printHelp(cout);
|
||||
exit(1);
|
||||
}
|
||||
if (statusName != "")
|
||||
{
|
||||
|
|
@ -318,11 +318,11 @@ int main(int argc, char **argv)
|
|||
{
|
||||
try
|
||||
{
|
||||
main_function(argc, argv);
|
||||
main_function(argc, argv);
|
||||
}
|
||||
catch(exception& e)
|
||||
{
|
||||
cout << "Exception: " << e.what() << '\n';
|
||||
cout << "Exception: " << e.what() << '\n';
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
|
|
|||
|
|
@ -14,4 +14,3 @@ double binary_value(const std::vector<bool>& _chrom)
|
|||
sum += _chrom[i];
|
||||
return sum;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
// REPRESENTATION
|
||||
//-----------------------------------------------------------------------------
|
||||
// Include the corresponding file
|
||||
#include <ga.h> // bitstring representation & operators
|
||||
#include <ga.h> // bitstring representation & operators
|
||||
// define your genotype and fitness types
|
||||
typedef eoBit<eoMinimizingFitness> Indi;
|
||||
|
||||
|
|
@ -126,8 +126,8 @@ void main_function(int argc, char **argv)
|
|||
// i.e. in case you need parameters somewhere else, postpone these
|
||||
if (parser.userNeedsHelp())
|
||||
{
|
||||
parser.printHelp(cout);
|
||||
exit(1);
|
||||
parser.printHelp(cout);
|
||||
exit(1);
|
||||
}
|
||||
if (statusParam.value() != "")
|
||||
{
|
||||
|
|
@ -393,11 +393,11 @@ int main(int argc, char **argv)
|
|||
{
|
||||
try
|
||||
{
|
||||
main_function(argc, argv);
|
||||
main_function(argc, argv);
|
||||
}
|
||||
catch(exception& e)
|
||||
{
|
||||
cout << "Exception: " << e.what() << '\n';
|
||||
cout << "Exception: " << e.what() << '\n';
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
|
|
|||
|
|
@ -15,6 +15,3 @@ double real_value(const std::vector<double>& _ind)
|
|||
}
|
||||
return sum;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -96,4 +96,3 @@ INSTALL(TARGETS RealEA RUNTIME DESTINATION share/eo/examples/Lesson4 COMPONENT e
|
|||
INSTALL(TARGETS ESEA RUNTIME DESTINATION share/eo/examples/Lesson4 COMPONENT examples)
|
||||
|
||||
######################################################################################
|
||||
|
||||
|
|
|
|||
|
|
@ -70,11 +70,11 @@ int main(int argc, char **argv)
|
|||
{
|
||||
try
|
||||
{
|
||||
main_function(argc, argv);
|
||||
main_function(argc, argv);
|
||||
}
|
||||
catch(exception& e)
|
||||
{
|
||||
cout << "Exception: " << e.what() << '\n';
|
||||
cout << "Exception: " << e.what() << '\n';
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
|
@ -94,7 +94,7 @@ void runAlgorithm(EOT, eoParser& _parser, eoState& _state)
|
|||
|
||||
// The evaluation fn - encapsulated into an eval counter for output
|
||||
eoEvalFuncPtr<EOT, double, const std::vector<double>&>
|
||||
mainEval( real_value );
|
||||
mainEval( real_value );
|
||||
eoEvalFuncCounter<EOT> eval(mainEval);
|
||||
|
||||
// the genotype - through a genotype initializer
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
###### General ######
|
||||
# --help=0 # -h : Prints this message
|
||||
# --stopOnUnknownParam=1 # Stop if unkown param entered
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ int main(int argc, char* argv[])
|
|||
|
||||
// The evaluation fn - encapsulated into an eval counter for output
|
||||
eoEvalFuncPtr<EOT, double, const std::vector<double>&>
|
||||
mainEval( real_value );
|
||||
mainEval( real_value );
|
||||
eoEvalFuncCounter<EOT> eval(mainEval);
|
||||
|
||||
// the genotype - through a genotype initializer
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
###### General ######
|
||||
# --help=0 # -h : Prints this message
|
||||
# --stopOnUnknownParam=1 # Stop if unkown param entered
|
||||
|
|
|
|||
|
|
@ -14,6 +14,3 @@ double real_value(const std::vector<double>& _ind)
|
|||
sum += _ind[i] * _ind[i];
|
||||
return sqrt(sum);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -108,4 +108,3 @@ private: // put all data here
|
|||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -60,4 +60,3 @@ private:
|
|||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue