Commit f9738b35 authored by Mathieu Hemery's avatar Mathieu Hemery
Browse files

Avoid a bug in generate_sufficient_variables

parent b9fe6703
......@@ -789,12 +789,19 @@ substract_N_exp([Head_m|Tail_m],N,[Head_s|Tail_s],[Head_new|Tail_new]):-
% strictly_smaller(+E1,-E2) generate E2 as non null and strictly smaller than E1
% smaller(+E1,-E2) generate E2 smaller than E1
generate_sufficient_variables(PODE, [First_Var|Var_set]) :-
generate_sufficient_variables(PODE, Final_set) :-
setof(Exp, is_monomial(PODE,Exp), Exp_set),
setof(Var, all_smaller(Exp_set,Var), Var_set),
[Head|_Remainder] = Var_set,
length(Head,L), Lm is L - 1,
displace_exponent([1],0,Lm,First_Var).% add the first var
( % add the first var if needed
member(First_Var, Var_set)
Final_set = Var_set
Final_set = [First_Var|Var_set]
is_monomial(PODE,Monom) :-
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment