// gene.h
// Declaration of class Gene
// Thomas Pederson, 950505

#ifndef GENE
#define GENE

#include "global.h"
#include <iostream.h>

class Gene
{
   public:
   Gene(char *_name, coord_t _x, coord_t _y,
	unsigned int _index, unsigned int _distVecLength);
   ~Gene();
   
   // Calculates Eucledian distance between this gene and _gene and returns the value.
   distance_t calculateDistanceTo(Gene& _gene);

   // Returns Eucledian distance between this gene and _gene.
   distance_t distanceTo(Gene& _gene);

   // Returns this gene's index in original chromosome pool.
   unsigned int getIndex() {return index;}

   // Returns this gene's name.
   char *getName() {return name;}

   // Prints gene information to stream.
   friend ostream& operator<<(ostream& outStr, Gene& gene);
   
   private:
   distance_t *distance; // distance vector
   unsigned int distVecLength; // length of distance vector
   char *name; // name of gene
   coord_t x,y; // gene's coordinates
   unsigned int index; // gene's index
};

#endif
















