Regarding the connectivity optimization – I think that for SciPy to compute whether two nodes are connected some non-constant time is required (probably executing Dijkstra). The optimization is supposed to save that time in case two nodes are disconnected. In case it is feasible to compute all pairs distances (time-wise and memory-wise), this optimization is less helpful ðŸ™‚

LikeLike

]]>I believe (but could be wrong) that SciPy checks under the hood for whether or not a path exists, so while understanding matrix powers for path existence is good, not really needed.

Getting shortest path cost is interesting but think you forget to do the more interesting part, extract the path ðŸ˜›

Of more interest, but missing from SciPy, are k-shortest paths.

LikeLike

]]>LikeLike

]]>How does this compare to allocating the pages with allocation type MEM_WRITE_WATCH, and using the GetWriteWatch/ResetWriteWatch to get/reset the write-tracking state?

LikeLike

]]>LikeLike

]]>LikeLike

]]>LikeLike

]]>LikeLike

]]>In general many of the switch statements are code smells which can be refactored using the strategy pattern.

LikeLike

]]>goto statement is NOT advisable for code maintainability. Use break. Or change the logic when you need a fall through.

LikeLike

]]>