#ifndef __FITNESS_FITNESS_H
#define __FITNESS_FITNESS_H
+#include <map>
+#include <string>
+
#include "chromosome.h"
namespace genetic {
* Copy constructor
*/
Fitness(_Chromosome& _chromosome)
- : chromosome(_chromosome.get()) {
+ : chromosome(_chromosome) {
}
/**
_Value calculate() {
return this->do_calculate();
}
+
+ /**
+ * Method used to pass additional arguments needed by the function to
+ * run correctly.
+ */
+ virtual void parseArguments(std::map<string, string>) { }
+
+ /**
+ * Method used to get additional arguments needed by the function to
+ * run correctly
+ *
+ * @return map containing additional arguments, empty if do not use any
+ */
+ virtual std::map<string, string> getArguments() {
+ return std::map<string, string>();
+ }
};
}