#ifndef __PROBLEMDOMAIN_H_
#define __PROBLEMDOMAIN_H_

#include "Definitions.h"
#include "IprocessConvergedAllele.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:
    unsigned int numberOfGenes;
    AlleleType *numberOfAlleles;
    ProblemDomain();
    virtual ~ProblemDomain();

  public:
    virtual bool isGood() const = 0;
    virtual FloatType getFitness( const AlleleType *chromosome ) const = 0;
    virtual void setInitialBias( IprocessConvergedAllele *pca );
    virtual TournamentReturn tournament( const AlleleType *individualLeft, const AlleleType *individualRight ) const;
    unsigned int getNumberOfGenes() const;
    const AlleleType * getNumberOfAlleles() const;
};

#endif /* __PROBLEMDOMAIN_H_ */
