Changeset 2825
- Timestamp:
- 02/17/10 23:13:03 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.CEDMA.Server/3.3/SimpleDispatcher.cs
r2591 r2825 199 199 } 200 200 algo.AllowedVariables = allowedFeatures; 201 202 IGeneticProgrammingAlgorithm structIdAlgo = algo as IGeneticProgrammingAlgorithm; 203 if (structIdAlgo != null) { 204 var funLib = SelectRandomFunctionLibrary(); 205 structIdAlgo.FunctionLibraryInjector = funLib; 206 } 207 } 208 209 private IOperator SelectRandomFunctionLibrary() { 210 var injectors = from injector in ApplicationManager.Manager.GetInstances<FunctionLibraryInjectorBase>() 211 where injector.GetType().GetCustomAttributes(typeof(SymbolicRegressionFunctionLibraryInjectorAttribute), true).Count() > 0 212 select injector; 213 214 return injectors.ElementAt(random.Next(injectors.Count())); 215 } 216 201 } 217 202 218 203 private void AddDispatchedRun(ProblemSpecification specification, string algorithm) {
Note: See TracChangeset
for help on using the changeset viewer.