-
Notifications
You must be signed in to change notification settings - Fork 27
Bug fix (choice of linear forms in the non-radical case) #259
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
base: master
Are you sure you want to change the base?
Conversation
jerebertho
left a comment
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.
Many thanks!
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.
You might be able to simplify the function equal_param by calling nmod_poly_equal on param->coords[i] and test_param->coords[i] in the outer loop.
See below.
| *bsz, *nlins_ptr, linvars, lineqs_ptr[0], squvars, | ||
| 0, bdata_fglm, bdata_bms, success, md); | ||
| int boo = equal_param(*bparam, *test_nmod_param); | ||
| if(boo == 0){ |
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.
| if(boo == 0){ | |
| if(! boo){ |
| test/diff/diff_reals_dim0-chgvar.sh \ | ||
| test/diff/diff_reals_dim0-extract.sh \ | ||
| test/diff/diff_reals_dim0-swapvar.sh \ | ||
| test/diff/diff_choice-linear-form.sh \ |
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.
| test/diff/diff_choice-linear-form.sh \ | |
| test/diff/diff_choice-linear-form-qq.sh \ |
| test/diff/diff_reals_dim0-extract.sh \ | ||
| test/diff/diff_reals_dim0-swapvar.sh \ | ||
| test/diff/diff_choice-linear-form.sh \ | ||
| test/diff/diff_choice-linear-form-real-roots.sh \ |
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.
| test/diff/diff_choice-linear-form-real-roots.sh \ | |
| test/diff/diff_choice-linear-form-qq-real-roots.sh \ |
| test/diff/diff_radical_shape-qq.sh:test/diff/diff_radical_shape-qq.sh | ||
| input_files/choice-linear-form-qq.ms:input_files/choice-linear-form-qq.ms | ||
| output_files/choice-linear-form-qq.res:output_files/choice-linear-form-qq.res | ||
| test/diff/diff_choice-linear-form.sh:test/diff/diff_choice-linear-form.sh |
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.
| test/diff/diff_choice-linear-form.sh:test/diff/diff_choice-linear-form.sh | |
| test/diff/diff_choice-linear-form-qq.sh:test/diff/diff_choice-linear-form-qq.sh |
| test/diff/diff_choice-linear-form.sh:test/diff/diff_choice-linear-form.sh | ||
| input_files/choice-linear-form-qq-real-roots.ms:input_files/choice-linear-form-qq-real-roots.ms | ||
| output_files/choice-linear-form-qq-real-roots.res:output_files/choice-linear-form-qq-real-roots.res | ||
| test/diff/diff_choice-linear-form-real-roots.sh:test/diff/diff_choice-linear-form-real-roots.sh |
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.
| test/diff/diff_choice-linear-form-real-roots.sh:test/diff/diff_choice-linear-form-real-roots.sh | |
| test/diff/diff_choice-linear-form-qq-real-roots.sh:test/diff/diff_choice-linear-form-qq-real-roots.sh |
| * */ | ||
| static int equal_param(param_t *param, param_t *test_param){ | ||
| for(int i = 0; i < param->nvars-1; i++){ | ||
| if(param->coords[i]->length != test_param->coords[i]->length){ |
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.
| if(param->coords[i]->length != test_param->coords[i]->length){ | |
| if(! nmod_poly_equal (param->coords[i], test_param->coords[i])){ | |
| return 0; | |
| } |
and then remove everything below until the end of the outer loop.
Disclaimer: this should be tested.
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.
Rename test/diff/diff_choice-linear-form-qq-real-roots.sh
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.
Rename test/diff/diff_choice-linear-form-qq.sh
This PR fixes a bug occurring for non radical ideals (when the radical is not in shape position).
The bug was precisely in the choice of new linear forms to be introduced.