[8670] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
| 3 | using System.Linq;
|
---|
| 4 | using System.Text;
|
---|
| 5 | using HeuristicLab.Core;
|
---|
| 6 | using HeuristicLab.Common;
|
---|
| 7 | using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
|
---|
| 8 | using HeuristicLab.Data;
|
---|
| 9 | using HeuristicLab.Parameters;
|
---|
| 10 |
|
---|
| 11 | namespace HeuristicLab.PDPSimulation.DistanceMeasures {
|
---|
| 12 | [StorableClass]
|
---|
| 13 | public class DistanceMatrixData: ParameterizedNamedItem, IStorableContent {
|
---|
| 14 | public ValueParameter<DoubleMatrix> DistanceMatrixParameter {
|
---|
| 15 | get { return (ValueParameter<DoubleMatrix>)Parameters["DistanceMatrix"]; }
|
---|
| 16 | }
|
---|
| 17 |
|
---|
| 18 | public DoubleMatrix DistanceMatrix {
|
---|
| 19 | get {
|
---|
| 20 | return DistanceMatrixParameter.Value;
|
---|
| 21 | }
|
---|
| 22 |
|
---|
| 23 | set {
|
---|
| 24 | DistanceMatrixParameter.Value = value;
|
---|
| 25 | }
|
---|
| 26 | }
|
---|
| 27 |
|
---|
| 28 | public ValueParameter<IntMatrix> PointMappingParameter {
|
---|
| 29 | get { return (ValueParameter<IntMatrix>)Parameters["PointMapping"]; }
|
---|
| 30 | }
|
---|
| 31 |
|
---|
| 32 | public IntMatrix Mapping {
|
---|
| 33 | get {
|
---|
| 34 | return PointMappingParameter.Value;
|
---|
| 35 | }
|
---|
| 36 |
|
---|
| 37 | set {
|
---|
| 38 | PointMappingParameter.Value = value;
|
---|
| 39 | }
|
---|
| 40 | }
|
---|
| 41 |
|
---|
| 42 | public DistanceMatrixData()
|
---|
| 43 | : base() {
|
---|
| 44 | Parameters.Add(new ValueParameter<DoubleMatrix>("DistanceMatrix", new DoubleMatrix()));
|
---|
| 45 | Parameters.Add(new ValueParameter<IntMatrix>("PointMapping", new IntMatrix()));
|
---|
| 46 | }
|
---|
| 47 | [StorableConstructor]
|
---|
| 48 | private DistanceMatrixData(bool deserializing) : base(deserializing) {
|
---|
| 49 | }
|
---|
| 50 | private DistanceMatrixData(DistanceMatrixData original, Cloner cloner)
|
---|
| 51 | : base(original, cloner) {
|
---|
| 52 | }
|
---|
| 53 |
|
---|
| 54 | public override IDeepCloneable Clone(Cloner cloner) {
|
---|
| 55 | return new DistanceMatrixData(this, cloner);
|
---|
| 56 | }
|
---|
| 57 |
|
---|
| 58 | #region IStorableContent Members
|
---|
| 59 |
|
---|
| 60 | public string Filename {
|
---|
| 61 | get;
|
---|
| 62 | set;
|
---|
| 63 | }
|
---|
| 64 |
|
---|
| 65 | #endregion
|
---|
| 66 | }
|
---|
| 67 | }
|
---|