pharo-ai / graph-algorithms

A graph algorithms library implemented in Pharo
MIT License
22 stars 12 forks source link

Look if the implementation of the binary sorting of nodes works as expected and add tests #9

Open jordanmontt opened 2 years ago

jordanmontt commented 2 years ago

Currently the nodes are stores in a collection. We have two types of nodes: the "model nodes" that are the ones that the user send as a parameters; and the graph nodes which are nodes that we use internally as a data structure. We store those nodes in a collection. When we want to search in which graph node is a given user node we need to do a linear search. There is support for doing a binary search.

This issue is to make sure that the binary search is done right and it works on all cases and to add tests.