-
Notifications
You must be signed in to change notification settings - Fork 3
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 function get_solution_count. #72
Conversation
to fix #17 two functions to add:
The first just returns an integer. The second returns an array of all the solutions. The second must be harder than the first. Let's do the first first.
|
@parmentelat I believe that based on my last push:
so the next step is maybe to add a Python test |
added some tests based on a very simple ec problem |
renamed data.py into problems.py add tests/bruteforce.py to compute brute force solutions 3 more problems with 2, 9 and 16 solutions
test solution_count on small_trimino problem
the current function doesn't crash but clearly doesn't give the right answer. we have a good selection of tests. |
current function looks like it gives the right answer, next steps are to add C tests and clean up the C code a bit I think it makes sense to merge this funcitonality when it's in a good state and then open a second PR for a function which returns an array of all the solutions. |
We need to figure out how the solution count should handle the following cases:
my guess is that the first will not happen (blank rows will be ignored) but that the second will happen (two rows the same means all the solutions that include one of them are counted twice). This also kind of seems like what one wants. |
this is published to pypi as 1.4.0a0 I think this probably can be merged with only documentation added, and then get_all_solutions which fills an array with solution vectors will be a separate PR. no point in cleaning up the C code until the second part has been done.
|
remove declaration of unused variable that triggers a build-time warning
trailing spaces and trailing newlines
No description provided.