-
Notifications
You must be signed in to change notification settings - Fork 40
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
Binary Linear Algebra #208
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.
Please rebase your branch atop of master.
3a9577a
to
855e86f
Compare
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.
Could you please check that time grows proportionally to n^2, benchmarking matrices of growing sizes? If this is the case, then having a large constant factor is eventually manageable, but if it is not so, we are in a bigger trouble.
There is a couple of hlint suggestions: https://travis-ci.org/github/Bodigrim/arithmoi/jobs/709224118#L1018 |
And one more thing to make Travis build happy: add |
Continuing our discussion elsewhere. The current submission does not eat all the RAM. Yes, allocating 5 millions of While you generate |
go lowerIndex upperIndex allItems@(item : otherItems) vector = case item `compare` entry of | ||
LT -> go lowerIndex (currentIndex - 1) allItems vector | ||
-- @(currentIndex + 1)@ makes sure no prime number index is 0 | ||
-- 0 is reserved for negative numbers |
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.
This is really unexpected semantics for a function, named binarySearch
. If users of this function need indices starting from 1, they can apply map (+1)
themselves.
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.
I added a comment to explain it better. Suppose I have Prime 2, Prime 3 and Prime 5. I want to send them respectively to 1,2,3. I use 0 to when the number is negative (its sign is true).
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.
To make it clearer 30
would be given by [1,2,3]
whereas -30
by [0,1,2,3]
.
c2e4f41
to
3c765c9
Compare
Yay! Thanks! |
An implementation of sparse binary vectors and matrices with linear algebra solver.