#ifndef INDIVIDUAL_H
#define INDIVIDUAL_H

#include "../rand/randomc.h"
#define RANDOM_GENERATOR TRandomMersenne
//#define RANDOM_GENERATOR TRanrotWGenerator
//#define RANDOM_GENERATOR TRandomMotherOfAll

#include "generic_individual.h"
#include "generic_fitness.h"

class individual : public generic_individual {
  static generic_fitness *evaluator;
  static int vector_count;
  static bool minimize;
  static int block_variants;
  static int block_size;

  char type;
  int cells;
  int size;
  float fitness;
  GENE *chromosome;
public:
  individual(char, int, RANDOM_GENERATOR *,
      float p_ones_ratio = DEFAULT_ONES_RATIO); // uses b_s

  individual(char, int, float, GENE *); // uses b_s
  individual(individual *);
  ~individual() { delete [] chromosome; }

  static bool set_evaluator(generic_fitness *); // uses b_s
  static int set_vector_count(int);
  static bool set_minimize(bool);

  static int get_vector_count() { return vector_count; }
  static bool get_minimize() { return minimize; }
  static int get_block_variants() { return block_variants; }
  static int get_block_size() { return block_size; }

  char get_type() { return type; }
  int get_cells() { return cells; }
  int get_size() { return size; }
  float get_fitness();
  GENE *get_chromosome(GENE *);

  GENE *get_matrix(GENE *); //
  int *get_rules(int *); // uses b_s
  GENE *get_seed(GENE *);

  bool compare(individual *);
  void print();
};

#endif /* INDIVIDUAL_H */

