Rev | Line | |
---|
[4516] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
| 3 | using System.Linq;
|
---|
| 4 | using System.Text;
|
---|
| 5 | using HeuristicLab.Core;
|
---|
| 6 |
|
---|
| 7 | namespace 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.