using HeuristicLab.Common; using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; using HEAL.Attic; namespace HeuristicLab.Algorithms.EvolvmentModelsOfModels { [StorableType("4A9F2F3F-3CF0-49FF-8B2F-FFF2B1601E60")] public class EMMTreeModel { public SymbolicExpressionTree SavedTree { get; private set; } public int ConstantNumber { get; private set; } public int ClusterNumber { get; private set; } [StorableConstructor] protected EMMTreeModel(StorableConstructorFlag _) { } public EMMTreeModel() { SavedTree = new SymbolicExpressionTree(); ConstantNumber = 0; ClusterNumber = 0; } public EMMTreeModel(SymbolicExpressionTree tree, int clusterNumber) { SavedTree = new SymbolicExpressionTree(tree.Root); ClusterNumber = clusterNumber; ConstantNumber = 0; // ConstantNumber = SavedTree.CalcaulateConstantsNumber(); // need to be aded } public EMMTreeModel(EMMTreeModel old) { SavedTree = new SymbolicExpressionTree(old.SavedTree.Root); ConstantNumber = old.ConstantNumber; ClusterNumber = old.ClusterNumber; } private EMMTreeModel(EMMTreeModel original, Cloner cloner) { SavedTree = cloner.Clone(original.SavedTree); ConstantNumber = original.ConstantNumber; ClusterNumber = original.ClusterNumber; } public void ConstantSet (double [] conatants) { // how to change constant in a tree? } } }