Changeset 5440
- Timestamp:
- 02/05/11 00:01:18 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab 3.3.sln
r5426 r5440 92 92 {00814351-4AB8-4088-9B99-F62787B89E93} = {00814351-4AB8-4088-9B99-F62787B89E93} 93 93 {3EAF1454-086D-44A2-8509-B1BA24DB1865} = {3EAF1454-086D-44A2-8509-B1BA24DB1865} 94 {2C429157-9C34-4DD3-9D5F-B444B751E39A} = {2C429157-9C34-4DD3-9D5F-B444B751E39A} 94 95 {3BD61258-31DA-4B09-89C0-4F71FEF5F05A} = {3BD61258-31DA-4B09-89C0-4F71FEF5F05A} 95 96 {DE69A359-A5B8-4D3D-BA8D-D5780D7F96D6} = {DE69A359-A5B8-4D3D-BA8D-D5780D7F96D6} -
trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/IDiscreteDoubleMatrixModifier.cs
r5435 r5440 28 28 public interface IDiscreteDoubleMatrixModifier : IItem { 29 29 ILookupParameter<DoubleMatrix> ValueParameter { get; } 30 I ValueLookupParameter<DoubleValue> ScaleParameter { get; }30 ILookupParameter<DoubleValue> ScaleParameter { get; } 31 31 ConstrainedValueParameter<IDiscreteDoubleValueModifier> ScalingOperatorParameter { get; } 32 32 IValueLookupParameter<DoubleValue> StartValueParameter { get; } -
trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/VelocityBoundsModifier.cs
r5435 r5440 37 37 get { return (ILookupParameter<DoubleMatrix>)Parameters["Matrix"]; } 38 38 } 39 public I ValueLookupParameter<DoubleValue> ScaleParameter {40 get { return (I ValueLookupParameter<DoubleValue>)Parameters["Scale"]; }39 public ILookupParameter<DoubleValue> ScaleParameter { 40 get { return (ILookupParameter<DoubleValue>)Parameters["Scale"]; } 41 41 } 42 42 public ConstrainedValueParameter<IDiscreteDoubleValueModifier> ScalingOperatorParameter { … … 64 64 [StorableConstructor] 65 65 private VelocityBoundsModifier(bool deserializing) : base(deserializing) { } 66 private VelocityBoundsModifier(VelocityBoundsModifier original, Cloner cloner) 67 : base(original, cloner) { 68 ParameterizeModifiers(); 69 } 66 private VelocityBoundsModifier(VelocityBoundsModifier original, Cloner cloner) : base(original, cloner) { } 70 67 public VelocityBoundsModifier() { 71 68 Parameters.Add(new LookupParameter<DoubleMatrix>("Matrix", "The double matrix to modify.")); 72 Parameters.Add(new ValueLookupParameter<DoubleValue>("Scale", "Scale parameter."));69 Parameters.Add(new LookupParameter<DoubleValue>("Scale", "Scale parameter.")); 73 70 Parameters.Add(new ConstrainedValueParameter<IDiscreteDoubleValueModifier>("ScalingOperator", "Modifies the value")); 74 71 Parameters.Add(new ValueLookupParameter<DoubleValue>("StartValue", "The start value of 'Value'.", new DoubleValue(1))); … … 79 76 80 77 Initialize(); 81 ParameterizeModifiers();82 78 } 83 79 … … 87 83 #endregion 88 84 89 [StorableHook(HookType.AfterDeserialization)]90 private void AfterDeserialization() {91 ParameterizeModifiers();92 }93 94 85 private void Initialize() { 95 86 foreach (IDiscreteDoubleValueModifier op in ApplicationManager.Manager.GetInstances<IDiscreteDoubleValueModifier>()) { 96 87 ScalingOperatorParameter.ValidValues.Add(op); 97 }98 }99 100 private void ParameterizeModifiers() {101 foreach (IDiscreteDoubleValueModifier op in ScalingOperatorParameter.ValidValues) {102 88 op.ValueParameter.ActualName = ScaleParameter.Name; 103 89 op.StartValueParameter.ActualName = StartValueParameter.Name;
Note: See TracChangeset
for help on using the changeset viewer.