Line | |
---|
1 | using HeuristicLab.Common;
|
---|
2 | using HeuristicLab.Core;
|
---|
3 | using HeuristicLab.Data;
|
---|
4 | using HeuristicLab.Encodings.RealVectorEncoding;
|
---|
5 | using HeuristicLab.Optimization;
|
---|
6 | using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
|
---|
7 |
|
---|
8 | namespace HeuristicLab.Algorithms.SAPBA.Operators {
|
---|
9 | [Item("FixedRealVectorCreator", "An operator which creates a new real vector cloned from a single Point")]
|
---|
10 | [StorableClass]
|
---|
11 | public class FixedRealVectorCreator : RealVectorCreator, IStrategyParameterCreator {
|
---|
12 | [Storable]
|
---|
13 | private RealVector Point;
|
---|
14 |
|
---|
15 | [StorableConstructor]
|
---|
16 | protected FixedRealVectorCreator(bool deserializing) : base(deserializing) { }
|
---|
17 | protected FixedRealVectorCreator(FixedRealVectorCreator original, Cloner cloner) : base(original, cloner) {
|
---|
18 | Point = cloner.Clone(original.Point);
|
---|
19 | }
|
---|
20 | public FixedRealVectorCreator(RealVector r) : base() {
|
---|
21 | Point = r;
|
---|
22 | }
|
---|
23 | public override IDeepCloneable Clone(Cloner cloner) { return new FixedRealVectorCreator(this, cloner); }
|
---|
24 | protected override RealVector Create(IRandom random, IntValue length, DoubleMatrix bounds) {
|
---|
25 | return (RealVector)Point.Clone();
|
---|
26 | }
|
---|
27 | }
|
---|
28 |
|
---|
29 | }
|
---|
30 |
|
---|
Note: See
TracBrowser
for help on using the repository browser.