Changeset 9194 for branches/LearningClassifierSystems/HeuristicLab.Encodings.ConditionActionEncoding/3.3/IClassifier.cs
- Timestamp:
- 01/28/13 17:54:46 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/LearningClassifierSystems/HeuristicLab.Encodings.ConditionActionEncoding/3.3/IClassifier.cs
r9175 r9194 20 20 #endregion 21 21 22 using System ;22 using System.Collections.Generic; 23 23 using HeuristicLab.Core; 24 24 25 25 namespace HeuristicLab.Encodings.ConditionActionEncoding { 26 /// <summary> 27 /// IMatching is used in dictinoaries, therefore the methods "Equals" and "GetHashCode" have to be overriden 28 /// IEquatable<IMatching> should be implemented as well. 29 /// 30 /// This also helps to implement macroclassifiers later on 31 /// </summary> 32 public interface IClassifier : IItem, IEquatable<IClassifier> { 33 IClassifier Condition { get; } 34 IClassifier Action { get; } 35 bool MatchCondition(IClassifier target); 36 bool MatchAction(IClassifier target); 26 public interface IClassifier : IItem { 27 ICondition Condition { get; } 28 IAction Action { get; } 29 30 bool MatchInput(IInput target); 31 bool MatchAction(IAction target); 37 32 bool IsMoreGeneral(IClassifier target); 33 bool IsMoreGeneral(ICondition target); 38 34 39 //to use IMatching as key in a dictionary, Equals and GetHashCode have to be override. 40 //Also IEquatable<Class> should be implemented. 41 bool Equals(object obj); 42 int GetHashCode(); 35 bool Identical(IClassifier target); 43 36 } 37 38 public interface ICondition : IItem { 39 bool Match(IInput target); 40 } 41 42 public interface IAction : IItem { 43 bool Match(IAction target); 44 } 45 46 public interface IInput : IItem { } 47 48 public interface IClassifierComparer : IEqualityComparer<IAction>, IItem { } 44 49 }
Note: See TracChangeset
for help on using the changeset viewer.