Changeset 9105 for branches/LearningClassifierSystems/HeuristicLab.Encodings.CombinedIntegerVectorEncoding
- Timestamp:
- 01/03/13 20:19:00 (12 years ago)
- Location:
- branches/LearningClassifierSystems/HeuristicLab.Encodings.CombinedIntegerVectorEncoding/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/LearningClassifierSystems/HeuristicLab.Encodings.CombinedIntegerVectorEncoding/3.3/CombinedIntegerVector.cs
r9089 r9105 48 48 public IntMatrix Bounds { get { return (IntMatrix)bounds.Clone(); } } 49 49 50 public int ConditionLength { get { return Length - actionLength; } } 51 50 52 [StorableConstructor] 51 53 protected CombinedIntegerVector(bool deserializing) : base(deserializing) { } … … 184 186 } 185 187 188 public bool IsMoreGeneral(IClassifier target) { 189 var targetVector = target as CombinedIntegerVector; 190 int curbounds; 191 192 if (this.NumberOfGeneralSymbols() <= targetVector.NumberOfGeneralSymbols()) return false; 193 194 for (int i = 0; i < ConditionLength; i++) { 195 curbounds = i % bounds.Rows; 196 if (this[i] != bounds[curbounds, 1] - 1 && this[i] != targetVector[i]) { 197 return false; 198 } 199 } 200 return true; 201 } 202 203 private int NumberOfGeneralSymbols() { 204 int numberOfGeneralSymbols = 0; 205 int curbounds; 206 207 for (int i = 0; i < ConditionLength; i++) { 208 curbounds = i % bounds.Rows; 209 numberOfGeneralSymbols += this[i] == bounds[curbounds, 1] - 1 ? 1 : 0; 210 } 211 212 return numberOfGeneralSymbols; 213 } 214 186 215 public override string ToString() { 187 216 StringBuilder strBuilder = new StringBuilder(this.Length); -
branches/LearningClassifierSystems/HeuristicLab.Encodings.CombinedIntegerVectorEncoding/3.3/HeuristicLab.Encodings.CombinedIntegerVectorEncoding-3.3.csproj
r9090 r9105 95 95 <Reference Include="System" /> 96 96 <Reference Include="System.Core" /> 97 <Reference Include="System.Drawing" /> 97 98 <Reference Include="System.Xml.Linq" /> 98 99 <Reference Include="System.Data.DataSetExtensions" />
Note: See TracChangeset
for help on using the changeset viewer.