Changeset 16479 for branches/2520_PersistenceReintegration
- Timestamp:
- 01/02/19 15:03:37 (6 years ago)
- Location:
- branches/2520_PersistenceReintegration
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2520_PersistenceReintegration/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/RegressionTreeModel.cs
r16470 r16479 29 29 using HeuristicLab.Core; 30 30 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 31 using HEAL.Fossil;32 31 using HeuristicLab.Problems.DataAnalysis; 33 32 using HeuristicLab.Problems.DataAnalysis.Symbolic; -
branches/2520_PersistenceReintegration/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/Distances/DistanceBase.cs
r16470 r16479 25 25 using HeuristicLab.Core; 26 26 using HEAL.Fossil; 27 using HEAL.Fossil;28 27 29 28 namespace HeuristicLab.Algorithms.DataAnalysis { … … 44 43 45 44 public double Get(object x, object y) { 46 return Get((T) x, (T)y);45 return Get((T)x, (T)y); 47 46 } 48 47 49 48 public IComparer GetDistanceComparer(object item) { 50 return new DistanceComparer((T) 49 return new DistanceComparer((T)item, this); 51 50 } 52 51 53 52 [StorableType("35fcecb5-9209-469b-9e4e-82efd8abfddf")] 54 53 internal class DistanceComparer : IComparer<T>, IComparer { 54 [Storable] 55 55 private readonly T item; 56 [Storable] 56 57 private readonly IDistance<T> dist; 58 59 [StorableConstructor] 60 protected DistanceComparer(StorableConstructorFlag _) { 61 } 57 62 58 63 public DistanceComparer(T item, IDistance<T> dist) { -
branches/2520_PersistenceReintegration/HeuristicLab.Scripting.Views/3.3/VariableStoreView.cs
r16462 r16479 35 35 using HeuristicLab.Persistence.Default.Xml; 36 36 using HeuristicLab.PluginInfrastructure; 37 using System.IO; 37 38 38 39 namespace HeuristicLab.Scripting.Views { … … 474 475 private bool IsSerializable(KeyValuePair<string, object> variable) { 475 476 Type type = null; 476 bool serializable ;477 bool serializable = false; 477 478 478 479 if (variable.Value != null) { 479 480 type = variable.Value.GetType(); 480 481 if (serializableLookup.TryGetValue(type, out serializable)) return serializable; 481 if (Storable ClassAttribute.IsStorableClass(type)) return serializableLookup[type] = true;482 } 483 484 var ser = new P ersistence.Core.Serializer(variable, ConfigurationService.Instance.GetDefaultConfig(new XmlFormat()), "ROOT", true);482 if (StorableTypeAttribute.IsStorableType(type)) return serializableLookup[type] = true; 483 } 484 485 var ser = new ProtoBufSerializer(); 485 486 try { 486 serializable = ser.Count() > 0; // try to create all serialization tokens 487 using (var memStream = new MemoryStream()) { 488 ser.Serialize(variable.Value, memStream); // try to serialize to memory stream 489 serializable = true; 490 } 487 491 } catch (PersistenceException) { 488 492 serializable = false; -
branches/2520_PersistenceReintegration/HeuristicLab.Selection/3.3/EvolutionStrategyOffspringSelector.cs
r16462 r16479 33 33 [StorableType("CE585C3C-5139-44F0-9CB2-CC901A290831")] 34 34 public class EvolutionStrategyOffspringSelector : SingleSuccessorOperator { 35 35 [StorableType("F1CA99A7-E9C2-49F3-8030-5CEE407357AA")] 36 36 private class FitnessComparer : IComparer<IScope> { 37 37 38 38 #region IComparer<IScope> Member 39 40 private String qualityParameterName; 39 [Storable] 40 private string qualityParameterName; 41 [Storable] 41 42 private bool maximization; 42 43 43 public FitnessComparer(String qualityParamName, bool maximization) { 44 [StorableConstructor] 45 protected FitnessComparer(StorableConstructorFlag _) { } 46 47 public FitnessComparer(string qualityParamName, bool maximization) { 44 48 this.qualityParameterName = qualityParamName; 45 49 this.maximization = maximization;
Note: See TracChangeset
for help on using the changeset viewer.