- Timestamp:
- 04/30/13 16:54:43 (12 years ago)
- Location:
- branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/HeuristicLab.Encodings.VariableVector-3.3.csproj
r9242 r9411 129 129 <Private>False</Private> 130 130 </ProjectReference> 131 <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis\3.4\HeuristicLab.Problems.DataAnalysis-3.4.csproj"> 132 <Project>{df87c13e-a889-46ff-8153-66dcaa8c5674}</Project> 133 <Name>HeuristicLab.Problems.DataAnalysis-3.4</Name> 134 </ProjectReference> 131 135 </ItemGroup> 132 136 <ItemGroup /> -
branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/VariableVectorAction.cs
r9242 r9411 83 83 var targetCast = target as VariableVectorAction; 84 84 if (targetCast == null) { return false; } 85 if (!this.Order.SequenceEqual(targetCast.Order)) { return false; } 86 foreach (var keyValuePair in targetCast.VariableDictionary) { 87 if (!VariableDictionary[keyValuePair.Key].MatchVariable(keyValuePair.Value)) { 85 foreach (var key in targetCast.VariableDictionary.Keys) { 86 if (!VariableDictionary.ContainsKey(key) || !VariableDictionary[key].MatchVariable(targetCast.VariableDictionary[key])) { 88 87 return false; 89 88 } -
branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/VariableVectorActionComparer.cs
r9392 r9411 42 42 43 43 public bool Equals(VariableVectorAction x, VariableVectorAction y) { 44 //if (!x.Order.SequenceEqual(y.Order)) return false;45 44 var xEnumerator = x.VariableDictionary.Keys.GetEnumerator(); 46 45 var yEnumerator = y.VariableDictionary.Keys.GetEnumerator(); 47 while (xEnumerator.MoveNext() && yEnumerator.MoveNext()) 48 foreach (var key in x.VariableDictionary.Keys) { 49 if (xEnumerator.Current != yEnumerator.Current || 50 !x.VariableDictionary[xEnumerator.Current].Identical(y.VariableDictionary[yEnumerator.Current])) { 51 return false; 52 } 46 while (xEnumerator.MoveNext() && yEnumerator.MoveNext()) { 47 if (xEnumerator.Current != yEnumerator.Current || 48 !x.VariableDictionary[xEnumerator.Current].Identical(y.VariableDictionary[yEnumerator.Current])) { 49 return false; 53 50 } 51 } 54 52 return !xEnumerator.MoveNext() && !yEnumerator.MoveNext(); 55 53 }
Note: See TracChangeset
for help on using the changeset viewer.