• Main Page
  • Modules
  • Classes
  • Files
  • File List

D:/Projekt/ECF_trunk/ECF/FitnessMin.cpp

00001 #include "ECF_base.h"
00002 #include "FitnessMin.h"
00003 #include<sstream>
00004 
00005 
00006 bool FitnessMin::isBetterThan(FitnessP other){
00007     //za min fitness, bolji je onaj koji ima MANJU vrijednost
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 }

Generated on Tue Nov 4 2014 13:04:31 for ECF by  doxygen 1.7.1