Last change
on this file since 16832 was
16722,
checked in by msemenki, 6 years ago
|
#2988: Add first version of GP for Evolvment models of models.
|
File size:
1.5 KB
|
Line | |
---|
1 | using HeuristicLab.Common;
|
---|
2 | using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
|
---|
3 | using HEAL.Attic;
|
---|
4 |
|
---|
5 | namespace HeuristicLab.Algorithms.EvolvmentModelsOfModels {
|
---|
6 | [StorableType("4A9F2F3F-3CF0-49FF-8B2F-FFF2B1601E60")]
|
---|
7 | public class EMMTreeModel {
|
---|
8 | public SymbolicExpressionTree SavedTree { get; private set; }
|
---|
9 | public int ConstantNumber { get; private set; }
|
---|
10 | public int ClusterNumber { get; private set; }
|
---|
11 |
|
---|
12 | [StorableConstructor]
|
---|
13 | protected EMMTreeModel(StorableConstructorFlag _) {
|
---|
14 | }
|
---|
15 |
|
---|
16 | public EMMTreeModel() {
|
---|
17 | SavedTree = new SymbolicExpressionTree();
|
---|
18 | ConstantNumber = 0;
|
---|
19 | ClusterNumber = 0;
|
---|
20 | }
|
---|
21 | public EMMTreeModel(SymbolicExpressionTree tree, int clusterNumber) {
|
---|
22 | SavedTree = new SymbolicExpressionTree(tree.Root);
|
---|
23 | ClusterNumber = clusterNumber;
|
---|
24 | ConstantNumber = 0;
|
---|
25 | // ConstantNumber = SavedTree.CalcaulateConstantsNumber(); // need to be aded
|
---|
26 | }
|
---|
27 | public EMMTreeModel(EMMTreeModel old) {
|
---|
28 | SavedTree = new SymbolicExpressionTree(old.SavedTree.Root);
|
---|
29 | ConstantNumber = old.ConstantNumber;
|
---|
30 | ClusterNumber = old.ClusterNumber;
|
---|
31 | }
|
---|
32 | private EMMTreeModel(EMMTreeModel original, Cloner cloner) {
|
---|
33 | SavedTree = cloner.Clone(original.SavedTree);
|
---|
34 | ConstantNumber = original.ConstantNumber;
|
---|
35 | ClusterNumber = original.ClusterNumber;
|
---|
36 | }
|
---|
37 | public void ConstantSet (double [] conatants) {
|
---|
38 | // how to change constant in a tree?
|
---|
39 |
|
---|
40 | }
|
---|
41 | }
|
---|
42 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.