Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/14/09 11:49:33 (15 years ago)
Author:
dtraxing
Message:

added comments, removed unused source code and added a description for the operators CreateChildren and CreateChildrenHardWired(ticket #580)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.SGA.Hardwired/3.3/CreateChildren.cs

    r1550 r1552  
    4444   
    4545    public override string Description {
    46       get { return @"Implements the functionality of method SGAMain hard wired."; }
     46      get { return @"Implements the control structures of CreateChildren hard wired. Operators are delegated."; }
    4747    }
    4848
     
    7070
    7171    public override IOperation Apply(IScope scope) {
    72 
    73       ci = new ChildrenInitializer();
    7472      crossover = (OperatorBase)GetVariableValue("Crossover", scope, true);
    7573      mutator = (OperatorBase)GetVariableValue("Mutator", scope, true);
     
    9189        counter.Execute(s);
    9290      } // foreach
    93       // set evaluated solutions
    94       //IntData value = GetVariableValue<IntData>("EvaluatedSolutions", scope, true);
    95       //value.Data = counter;
    9691
    97       // sort with using of operator
    9892      sorter.Execute(scope);
    99 
    100       // sort scopes
    101       //bool descending = false;//GetVariableValue<BoolData>("Descending", scope, true).Data;
    102       //double[] keys = new double[scope.SubScopes.Count];
    103       //int[] sequence = new int[keys.Length];
    104 
    105       //for (int i = 0; i < keys.Length; i++) {
    106       //  keys[i] = scope.SubScopes[i].GetVariableValue<DoubleData>("Quality", false).Data;
    107       //  sequence[i] = i;
    108       //}
    109 
    110       //Array.Sort<double, int>(keys, sequence);
    111 
    112       //if (descending) {
    113       //  int temp;
    114       //  for (int i = 0; i < sequence.Length / 2; i++) {
    115       //    temp = sequence[i];
    116       //    sequence[i] = sequence[sequence.Length - 1 - i];
    117       //    sequence[sequence.Length - 1 - i] = temp;
    118       //  }
    119       //}
    120       //scope.ReorderSubScopes(sequence);
    12193
    12294      return null;
    12395    } // Apply
    124 
    125   } // class SGAMain
    126 
    127 } // namespace HeuristicLab.SGA
     96  } // class CreateChildren
     97} // namespace HeuristicLab.SGA.Hardwired
Note: See TracChangeset for help on using the changeset viewer.