girgs icon indicating copy to clipboard operation
girgs copied to clipboard

Minor adjustments to load libary directly

Open manpen opened this issue 6 years ago • 1 comments

In the still pending PR for NetworKit I decided to copy the code to modify it slightly. However, actually not many changes are necessary:

1.) I need to be able to pass a PRNG reference rather than a seed 2.) I need to be able to stop the generation prematurely (NetworKit stops algorithms on SIGINT)

The first one is easy: I could add a SpatialTree::generateEdges(std::mt19937_64&); overload. Additionally I would like to provide std::vector<std::mt19946_64*> overloads to generateWeights and generatePositions.

For the second I would add a template <typename StopCallback> to the SpatialTree which would default top a "never-stop" predicate and hence should be removed by the compiler if it remains unused.

Would you accept such a PR? Then we could use the library directly as a git submodule.

manpen avatar Oct 11 '19 07:10 manpen

1.) Fine with me 2.) A bit ugly, but I have no better solution.

chistopher avatar Oct 16 '19 12:10 chistopher