00001 #include "ECF_base.h"
00002 #include "FitnessMin.h"
00003 #include<sstream>
00004
00005
00006 bool FitnessMin::isBetterThan(FitnessP other){
00007
00008 return value_ < other->getValue();
00009 }
00010
00011
00012 FitnessMin* FitnessMin::copy()
00013 { FitnessMin *newObject = new FitnessMin(*this);
00014 return newObject;
00015 }
00016
00017
00018 void FitnessMin::write(XMLNode &xFitness)
00019 {
00020 xFitness = XMLNode::createXMLTopNode("FitnessMin");
00021 std::stringstream sValue;
00022 sValue << value_;
00023 xFitness.addAttribute("value", sValue.str().c_str());
00024 }