Skip to content

Commit

Permalink
major bug fix (even though it'll shortly be clobbered by moving from …
Browse files Browse the repository at this point in the history
…child dictionaries to child sorted lists).
  • Loading branch information
sdcondon committed Sep 28, 2024
1 parent 726243a commit 2968f12
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class VariableUnifyingEqualityComparerTests
X: P(F(X), F(Y)),
Y: P(F(Y), F(X))),

new( // todo: passes only because the tests standardise the vars as part of tocnf.
new(
X: P(X, Y, Z),
Y: P(Y, Z, X)),
])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public async IAsyncEnumerable<KeyValuePair<KeyValuePair<TFeature, int>, IAsyncFe
/// <inheritdoc/>
public ValueTask<IAsyncFeatureVectorIndexNode<TFeature, TValue>> GetOrAddChildAsync(KeyValuePair<TFeature, int> vectorComponent)
{
IAsyncFeatureVectorIndexNode<TFeature, TValue> node = new AsyncFeatureVectorIndexDictionaryNode<TFeature, TValue>();
IAsyncFeatureVectorIndexNode<TFeature, TValue> node = new AsyncFeatureVectorIndexDictionaryNode<TFeature, TValue>(childrenByVectorComponent.Comparer);
if (!childrenByVectorComponent.TryAdd(vectorComponent, node))
{
node = childrenByVectorComponent[vectorComponent];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public IFeatureVectorIndexNode<TFeature, TValue> GetOrAddChild(KeyValuePair<TFea
{
if (!childrenByVectorComponent.TryGetValue(vectorComponent, out var node))
{
node = new FeatureVectorIndexDictionaryNode<TFeature, TValue>();
node = new FeatureVectorIndexDictionaryNode<TFeature, TValue>(childrenByVectorComponent.Comparer);
childrenByVectorComponent.Add(vectorComponent, node);
}

Expand Down

0 comments on commit 2968f12

Please sign in to comment.