Beispiel #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);
 }
Beispiel #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));
            }
        }
Beispiel #3
0
 public void setFits(MahFunc func)
 {
     for (int i = 0; i < m_ind.Count; i++) {
         m_ind [i].setFit (func);
     }
 }
Beispiel #4
0
 public void setFit(MahFunc func)
 {
     m_fit = func.calcFitness (this);
 }
Beispiel #5
0
 public Individuo(int size, MahFunc func)
 {
     init (size, func.getBound ());
 }
Beispiel #6
0
 public Individuo(int size, MahFunc func)
 {
     init (size, func.getBound ());
     m_fit = func.calcFitness (this);
 }