#ifndef __STATISTICS_H_
#define __STATISTICS_H_

class Statistics {
  private:
    static Statistics *instance;
    Statistics();

    double startTime;
    bool timerStarted;
    unsigned int numGenerationsTotal;
    unsigned int numGenerationsEpoch;
    unsigned int numEpochs;
    unsigned int numConvergedAlleles;
    bool globalStopSent;
    bool executionFinished;

  public:
    static Statistics * getInstance();
    static void deleteInstance();

    void startNewEpoch();
    void startTimer();

    unsigned int getCpuTime() const;
    void setNumGenerationsTotal( unsigned int value );
    unsigned int getNumGenerationsTotal() const;
    void setNumGenerationsEpoch( unsigned int value );
    unsigned int getNumGenerationsEpoch() const;
    unsigned adjustNumGenerations( int value );
    void setNumEpochs( unsigned int value );
    unsigned int getNumEpochs() const;
    void setNumConvergedAlleles( unsigned int value );
    unsigned int getNumConvergedAlleles() const;
    bool isGlobalStopSent() const;
    void setGlobalStopSent( bool value = true );
    bool isExecutionFinished() const;
    void setExecutionFinished( bool value = true );
};

#endif /* __STATISTICS_H_ */
