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

Comparison operations #9

Open
Daniel-Liu-c0deb0t opened this issue Aug 27, 2020 · 2 comments
Open

Comparison operations #9

Daniel-Liu-c0deb0t opened this issue Aug 27, 2020 · 2 comments

Comments

@Daniel-Liu-c0deb0t
Copy link
Collaborator

Daniel-Liu-c0deb0t commented Aug 27, 2020

More comparison operations can be implemented and sped up using vector operations.

  • == (basic version available in src/utils)
  • <
  • <=

The order can be pretty arbitrary; its just that some consistent order has to exist to allow sorting and binary search tree operations to be well-defined.

@natir
Copy link
Owner

natir commented Aug 28, 2020

More I think on nuc2bit more I think we need to create a type to store the 2 bit representation of nucleotide.

Maybe we can use or by inspired by bv or bitvec

@Daniel-Liu-c0deb0t
Copy link
Collaborator Author

Daniel-Liu-c0deb0t commented Aug 28, 2020

That is a very good point. It allows the internal representation, which is a contiguous piece of memory, to be manually managed (special alignment and padding) for maximum efficiency, so allocations do not have to be done for every operation. It should be easier for us to manually roll a bit vector class, since we want to control the memory carefully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants