allow backtracking over possible values of constraints.a

This commit is contained in:
Vitor Santos Costa 2012-12-13 15:53:01 +00:00
parent 8b996c5dc9
commit c4448d066a

View File

@ -109,7 +109,7 @@ collect(Keys, Factors) :-
queue_in(K) :-
queue(K), !.
queue_in(K) :-
%writeln(+K),
% writeln(q+K),
assert(queue(K)),
fail.
queue_in(_).
@ -147,7 +147,7 @@ add_factor(factor(Type, Id, Ks, _, _Phi, Constraints), NKs) :-
avg_factors(K, Els, 0.0, NewKeys, NewId),
NKs = [K|NewKeys]
;
once(run(Constraints)),
run(Constraints),
NKs = Ks,
Id = NewId
),