Skip to content

Comparison To Networkx

neta-r edited this page Jan 9, 2021 · 1 revision

nx_cmp

This is a simple class whose purpose is to compare our solutions to the networkx library.

Functions:

  • A read_json_file function which convert json file to an networkx object by using the "with open" function, the json library and the "load" function.
  • Main - which goes over all of the graphs and converting them to a networkx object using the read_json_file function, and to a GraphAlgo object using the "load" function. The function is measuring the time of the two class to operate the "shortets_path" and the "connected_components" functions. It is also printing the results to check correctness.

Menu

Clone this wiki locally