Skip to content
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

IBLTMultiset as a regular IBLT, add operations to be abstracted in their own classes #67

Open
novakboskov opened this issue Jul 22, 2020 · 0 comments
Assignees

Comments

@novakboskov
Copy link
Collaborator

novakboskov commented Jul 22, 2020

Ideally, the IBLT class should be templated with the abstract Adder class. The Adder class should have two concrete classes of which one is a regular decimal adder (considered default) and another one is the modular adder that works for multisets. DecimalAdder and ModularAdder should be very simple classes that only use operator+.

What is the issue with the current implementation?

  • It doubles a lot of code and needs complete separate implementations of the sync protocol for IBLT and IBLTMultiset.

Other issues:

  • void Communicant::commSend(const IBLTMultiset &iblt, bool sync) is superfluous. If IBLTMultiset inherits from IBLT then why wouldn't IBLT version of commSend work for IBLTMultiset too?
  • _insertModular accepts 1 or -1 and does addition and subtraction. That is not a good idea as the function does not return anything and all the positive and negative integers will pass arguments type checking thus making troubles in runtime.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants