- Timestamp:
- 12/21/09 16:14:40 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.CEDMA.Server/3.3/SimpleDispatcher.cs
r2440 r2566 34 34 using HeuristicLab.Modeling.Database; 35 35 using HeuristicLab.DataAnalysis; 36 using HeuristicLab.GP.Interfaces; 37 using HeuristicLab.GP; 38 using HeuristicLab.GP.StructureIdentification; 36 39 37 40 namespace HeuristicLab.CEDMA.Server { … … 196 199 } 197 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 DiscoveryService ds = new DiscoveryService(); 211 var injectors = from injector in ds.GetInstances<FunctionLibraryInjectorBase>() 212 where injector.GetType().GetCustomAttributes(typeof(SymbolicRegressionFunctionLibraryInjectorAttribute), true).Count() > 0 213 select injector; 214 215 return injectors.ElementAt(random.Next(injectors.Count())); 198 216 } 199 217
Note: See TracChangeset
for help on using the changeset viewer.