#ifndef __PROBLEMDOMAIN_H_
#define __PROBLEMDOMAIN_H_

#include "Definitions.h"

#include <cstddef>
#include <boost/noncopyable.hpp>

class ProblemDomain : boost::noncopyable {
  public:
    static const FloatType POSITIVE_INFINITY, NEGATIVE_INFINITY;
    struct TournamentReturn {
      enum Winner { LEFT, RIGHT, TIE };
      TournamentReturn( Winner w, FloatType f ) : winner( w ), winningFitness( f ) { /* Empty */ }
      Winner winner;
      FloatType winningFitness;
    };

  protected:
    ProblemDomain() : numberOfGenes( 0 ), numberOfAlleles( NULL ) { /* Empty */ }
    virtual ~ProblemDomain() { /* Empty */ }
    unsigned int numberOfGenes;
    AlleleType *numberOfAlleles;

  public:
    virtual bool isGood() const = 0;
    virtual TournamentReturn tournament( AlleleType *individualLeft, AlleleType *individualRight ) const;
    virtual FloatType getFitness( AlleleType *chromosome ) const = 0;

    unsigned int getNumberOfGenes() const { return numberOfGenes; }
    const AlleleType * getNumberOfAlleles() const { return numberOfAlleles; }

};

#endif /* __PROBLEMDOMAIN_H_ */
