@@ -17,19 +17,13 @@ public sealed class NestOption : OptionBase, IDictionary<string, OptionBase>
17
17
{
18
18
private readonly Dictionary < string , OptionBase > _options = new Dictionary < string , OptionBase > ( ) ;
19
19
20
- /// <summary>
21
20
/// <inheritdoc/>
22
- /// </summary>
23
21
public OptionBase this [ string key ] { get => ( ( IDictionary < string , OptionBase > ) _options ) [ key ] ; set => ( ( IDictionary < string , OptionBase > ) _options ) [ key ] = value ; }
24
22
25
- /// <summary>
26
23
/// <inheritdoc/>
27
- /// </summary>
28
24
public override int FeatureSpaceDim => _options . Values . Select ( x => x . FeatureSpaceDim ) . Sum ( ) ;
29
25
30
- /// <summary>
31
26
/// <inheritdoc/>
32
- /// </summary>
33
27
public override double [ ] Default
34
28
{
35
29
get
@@ -40,9 +34,7 @@ public override double[] Default
40
34
}
41
35
}
42
36
43
- /// <summary>
44
37
/// <inheritdoc/>
45
- /// </summary>
46
38
public override int ? [ ] Step
47
39
{
48
40
get
@@ -53,9 +45,7 @@ public override int?[] Step
53
45
}
54
46
}
55
47
56
- /// <summary>
57
48
/// <inheritdoc/>
58
- /// </summary>
59
49
public override Parameter SampleFromFeatureSpace ( double [ ] values )
60
50
{
61
51
var param = Parameter . CreateNestedParameter ( ) ;
@@ -71,9 +61,7 @@ public override Parameter SampleFromFeatureSpace(double[] values)
71
61
return param ;
72
62
}
73
63
74
- /// <summary>
75
64
/// <inheritdoc/>
76
- /// </summary>
77
65
public override double [ ] MappingToFeatureSpace ( Parameter parameter )
78
66
{
79
67
var res = new List < double > ( ) ;
@@ -88,109 +76,79 @@ public override double[] MappingToFeatureSpace(Parameter parameter)
88
76
return res . ToArray ( ) ;
89
77
}
90
78
91
- /// <summary>
92
79
/// <inheritdoc/>
93
- /// </summary>
94
80
public ICollection < string > Keys => ( ( IDictionary < string , OptionBase > ) _options ) . Keys ;
95
81
96
- /// <summary>
97
82
/// <inheritdoc/>
98
- /// </summary>
99
83
public ICollection < OptionBase > Values => ( ( IDictionary < string , OptionBase > ) _options ) . Values ;
100
84
101
- /// <summary>
102
85
/// <inheritdoc/>
103
- /// </summary>
104
86
public int Count => ( ( ICollection < KeyValuePair < string , OptionBase > > ) _options ) . Count ;
105
87
106
- /// <summary>
107
88
/// <inheritdoc/>
108
- /// </summary>
109
89
public bool IsReadOnly => ( ( ICollection < KeyValuePair < string , OptionBase > > ) _options ) . IsReadOnly ;
110
90
111
- /// <summary>
112
91
/// <inheritdoc/>
113
- /// </summary>
114
92
public void Add ( string key , OptionBase value )
115
93
{
116
94
( ( IDictionary < string , OptionBase > ) _options ) . Add ( key , value ) ;
117
95
}
118
96
119
- /// <summary>
120
97
/// <inheritdoc/>
121
- /// </summary>
122
98
public void Add ( KeyValuePair < string , OptionBase > item )
123
99
{
124
100
( ( ICollection < KeyValuePair < string , OptionBase > > ) _options ) . Add ( item ) ;
125
101
}
126
102
127
- /// <summary>
128
103
/// <inheritdoc/>
129
- /// </summary>
130
104
public void Clear ( )
131
105
{
132
106
( ( ICollection < KeyValuePair < string , OptionBase > > ) _options ) . Clear ( ) ;
133
107
}
134
108
135
- /// <summary>
136
109
/// <inheritdoc/>
137
- /// </summary>
138
110
public bool Contains ( KeyValuePair < string , OptionBase > item )
139
111
{
140
112
return ( ( ICollection < KeyValuePair < string , OptionBase > > ) _options ) . Contains ( item ) ;
141
113
}
142
114
143
- /// <summary>
144
115
/// <inheritdoc/>
145
- /// </summary>
146
116
public bool ContainsKey ( string key )
147
117
{
148
118
return ( ( IDictionary < string , OptionBase > ) _options ) . ContainsKey ( key ) ;
149
119
}
150
120
151
- /// <summary>
152
121
/// <inheritdoc/>
153
- /// </summary>
154
122
public void CopyTo ( KeyValuePair < string , OptionBase > [ ] array , int arrayIndex )
155
123
{
156
124
( ( ICollection < KeyValuePair < string , OptionBase > > ) _options ) . CopyTo ( array , arrayIndex ) ;
157
125
}
158
126
159
- /// <summary>
160
127
/// <inheritdoc/>
161
- /// </summary>
162
128
public IEnumerator < KeyValuePair < string , OptionBase > > GetEnumerator ( )
163
129
{
164
130
return ( ( IEnumerable < KeyValuePair < string , OptionBase > > ) _options ) . GetEnumerator ( ) ;
165
131
}
166
132
167
- /// <summary>
168
133
/// <inheritdoc/>
169
- /// </summary>
170
134
public bool Remove ( string key )
171
135
{
172
136
return ( ( IDictionary < string , OptionBase > ) _options ) . Remove ( key ) ;
173
137
}
174
138
175
- /// <summary>
176
139
/// <inheritdoc/>
177
- /// </summary>
178
140
public bool Remove ( KeyValuePair < string , OptionBase > item )
179
141
{
180
142
return ( ( ICollection < KeyValuePair < string , OptionBase > > ) _options ) . Remove ( item ) ;
181
143
}
182
144
183
- /// <summary>
184
145
/// <inheritdoc/>
185
- /// </summary>
186
146
public bool TryGetValue ( string key , out OptionBase value )
187
147
{
188
148
return ( ( IDictionary < string , OptionBase > ) _options ) . TryGetValue ( key , out value ) ;
189
149
}
190
150
191
- /// <summary>
192
151
/// <inheritdoc/>
193
- /// </summary>
194
152
IEnumerator IEnumerable . GetEnumerator ( )
195
153
{
196
154
return ( ( IEnumerable ) _options ) . GetEnumerator ( ) ;
0 commit comments