Open annaritz opened 4 years ago
Good idea. Do you suggest we throw fileio.py
into an existing directory (maybe misc
?), or make a new utils
directory.
Maybe make a utils
directory. Some other notes:
The graph can be weighted or unweighted -- the new methods I added also assume a cost
attribute to every edge, which is the negative log of the weights. Specifically, for weight w
,
cost = -math_log(max([0.000000001, w]))/math_log(10))
I"ve added this to the df_to_graph()
functions in ShortestPaths, BowtieBUilder, and ResponseNet.
get_labeled_nodes()
-- can sources and sinks be a set instead of a list? BowTieBUilder requires a set.
Common file input/output functions can be put into their on
fileio.py
module. For now I copied yourdf_to_graph()
function andsrc_sink()
function from PerfectLinker to my code.