Skip to content

Inserted values are ignored if inserted with the same key #5

Description

@ForNeVeR

KdTree seems to always be ignoring the new values if there's an old value stored with the same key. Here's an example:

usingSystem;usingKdTree;usingKdTree.Math;namespaceConsoleApplication2{classProgram{staticvoidMain(string[]args){vartree=newKdTree<float,int>(2,newFloatMath());varcoords=new[]{0.0f,0.0f};tree.Add(coords,100);tree.Add(coords,200);varz=tree.FindValueAt(coords);Console.Write(z);// => 100, but I'd expect 200}}}

It would be better to either replace the existing value or throw an exception. I think that the library should never silently ignore the user value.

Maybe the problem will be solved as part of #4.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions