Example #1
0
 public HillEvo(int tp, AlgSelection sel, CruceYMutacion crux, MahFunc func)
 {
     m_sel = sel;
     m_crux = crux;
     m_func = func;
     m_tp = tp;
     m_pop = new Poblacion(tp);
 }
Example #2
0
        public void init(int tam, int size, MahFunc func)
        {
            m_ind = new List<Individuo>(tam);

            for(int i = 0; i < m_ind.Capacity; i++)
            {
                m_ind.Add (new Individuo(size, func));
            }
        }
Example #3
0
 public void setFits(MahFunc func)
 {
     for (int i = 0; i < m_ind.Count; i++) {
         m_ind [i].setFit (func);
     }
 }
Example #4
0
 public void setFit(MahFunc func)
 {
     m_fit = func.calcFitness (this);
 }
Example #5
0
 public Individuo(int size, MahFunc func)
 {
     init (size, func.getBound ());
 }
Example #6
0
 public Individuo(int size, MahFunc func)
 {
     init (size, func.getBound ());
     m_fit = func.calcFitness (this);
 }