Last active
August 29, 2015 14:00
-
-
Save suma/11203477 to your computer and use it in GitHub Desktop.
Jubatus push-pull mixer (C++ 風な疑似言語)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// push-pull mixer | |
for (candidate in candidates) { | |
// pull from candidate | |
vector<bytes> my_args = self->get_pull_argument(0); | |
vector<bytes> candidate_diff = caondadate->pull(my_args); | |
// pull from me (myself) | |
vector<bytes> candidate_args = candidate->get_pull_argument(); | |
vector<bytes> my_diff = self->pull(candidate_args); | |
// push to candidate/myself | |
candidate->push(my_diff); | |
self->push(candidate_diff); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment