-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an option to skip a portion of deletes. Copy the algorithm struct in CompareToOracle. #25
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly LGTM -- but I think the algorithm New should be also done in algorithm.go (Launch or Run)?
if aOF, ok := any(alg).(AlgorithmOnFinish[V, E, M, N]); ok { | ||
algOracle := alg | ||
if aN, ok := any(alg).(AlgorithmNew[V, E, M, N, A]); ok { | ||
algOracle = aN.New() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this also be done in the main flow as well as here in the oracle section?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah you're right. I was assuming the user would have called New() themselves before launching the algorithm.
graph/graph-options.go
Outdated
@@ -104,6 +106,11 @@ func FlagsToOptions() (graphOptions GraphOptions) { | |||
tsInterval = uint64(*dEdgePtr) | |||
} | |||
deleteOnExpire := (24 * 60 * 60) * uint64(*windowPtr) | |||
if *skipDelProbPtr != 0 { | |||
if *skipDelProbPtr < 0 || *skipDelProbPtr >= 1 { | |||
log.Panic().Msg("sdp must be in the range [0, 1)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log.Panic().Msg("sdp must be in the range [0, 1)") | |
log.Panic().Msg("Skip deletion probability must be in the range [0, 1)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Actually I think this option is still not ready yet because its performance is too bad (due to the linear search). Maybe we should hide this command line option. The max-flow algorithm can now handle deletes efficiently so a simple sliding window should be fine for the evaluation.
5080ab1
to
96984f0
Compare
No description provided.