Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encodings/ParameterSet.cs @ 4516

Last change on this file since 4516 was 4516, checked in by cneumuel, 14 years ago

initial prototype for Meta Optimization Problem (#1215)

File size: 858 bytes
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using HeuristicLab.Core;
6
7namespace HeuristicLab.Problems.MetaOptimization {
8  public class ParameterSet : Item, IParameterSet {
9    private List<KeyValuePair<string, IParameter>> parameters;
10    public IEnumerable<KeyValuePair<string, IParameter>> Parameters {
11      get { return parameters; }
12    }
13
14    public ParameterSet() {
15      this.parameters = new List<KeyValuePair<string, IParameter>>();
16    }
17    public ParameterSet(ParameterConfigurationList parametersToOptimize, IRandom random)
18      : this() {
19      foreach (IParameterConfiguration config in parametersToOptimize.CheckedItems) {
20        parameters.Add(new KeyValuePair<string, IParameter>(config.Category, config.GetParameterWithRandomValue(random)));
21      }
22    }
23
24
25  }
26}
Note: See TracBrowser for help on using the repository browser.