Murali-group / PathLinker

Connect the dots in networks.
GNU General Public License v3.0
16 stars 9 forks source link

Factor out Graph Preparation to be Transparent to End Users #7

Open mitchwagner opened 6 years ago

mitchwagner commented 6 years ago

Problem: Currently, users who want to apply PathLinker to a network have to prepare it manually using the modifyGraphForKSP functions, (specifically, adding sources and targets) and optionally the logTransformEdgeWeights function (and corresponding undo function after results are returned). Only after such transformations can users call the ksp.k_shortest_paths_yen routine, because instead of a list of sources and a list of targets, it takes a super source and super sink node that are assumed to already have been added.

The only other option is to run PathLinker as a process, passing in names of files listing nodes and edges, which is unwieldy if one is already working and Python and has the option of avoiding going to disk for anything.

Desired: All of this could be conveniently abstracted away into a method. This method would have largely the same parameters as the executable version of PathLinker, but would operating on and return in-memory objects instead of files.