Free cookie consent management tool by TermsFeed Policy Generator

source: branches/2895_PushGP_GenealogyAnalysis/HeuristicLab.Problems.ProgramSynthesis/Push/Configuration/IEnabledExpressionsConfiguration.cs @ 17189

Last change on this file since 17189 was 15771, checked in by bburlacu, 7 years ago

#2895: Add solution skeleton for PushGP with genealogy analysis.

File size: 1.6 KB
Line 
1using System;
2using System.Collections.Generic;
3
4namespace HeuristicLab.Problems.ProgramSynthesis {
5  using HeuristicLab.Core;
6
7  public class EnabledExpressionsChangedEventArgs : EventArgs {
8    public IEnumerable<string> AddedExpressions { get; private set; }
9    public IEnumerable<string> RemovedExpressions { get; private set; }
10
11    public EnabledExpressionsChangedEventArgs(IEnumerable<string> addedExpressions, IEnumerable<string> removedExpressions) {
12      AddedExpressions = addedExpressions;
13      RemovedExpressions = removedExpressions;
14    }
15  }
16
17  public interface IReadOnlyExpressionsConfiguration : INamedItem {
18    int InExpressionCount { get; }
19
20
21    IReadOnlyList<string> EnabledExpressions { get; }
22    IReadOnlyDictionary<StackTypes, int> ExpressionsPerStackCount { get; }
23  }
24
25  public interface IExpressionsConfiguration : IReadOnlyExpressionsConfiguration {
26    event EventHandler<EnabledExpressionsChangedEventArgs> EnabledExpressionsChanged;
27
28    void EnableStack(StackTypes types, bool enableDependencies = false);
29    void DisableStack(StackTypes type, bool enableDependencies = false);
30    void SetStack(StackTypes type, bool state, bool setDependencies = false);
31    void EnableExpressionOfStack(StackTypes types);
32    void DisableExpressionsOfStack(StackTypes types);
33    void EnableExpression(string name);
34    void DisableExpression(string name);
35    void SetExpression(string name, bool state);
36    void SetExpression<T>(bool state) where T : Expression;
37    void EnableExpression<T>() where T : Expression;
38    void DisableExpression<T>() where T : Expression;
39  }
40}
Note: See TracBrowser for help on using the repository browser.