Merge branch 'master' of ssh://yap.git.sourceforge.net/gitroot/yap/yap-6.3
This commit is contained in:
commit
c2791748d2
@ -142,6 +142,7 @@ add_factor(factor(Type, Id, Ks, _, _Phi, Constraints), NKs) :-
|
|||||||
%writeln(+Ks),
|
%writeln(+Ks),
|
||||||
( Ks = [K,Els], var(Els)
|
( Ks = [K,Els], var(Els)
|
||||||
->
|
->
|
||||||
|
% aggregate factor
|
||||||
once(run(Constraints)),
|
once(run(Constraints)),
|
||||||
avg_factors(K, Els, 0.0, NewKeys, NewId),
|
avg_factors(K, Els, 0.0, NewKeys, NewId),
|
||||||
NKs = [K|NewKeys]
|
NKs = [K|NewKeys]
|
||||||
@ -150,8 +151,13 @@ add_factor(factor(Type, Id, Ks, _, _Phi, Constraints), NKs) :-
|
|||||||
NKs = Ks,
|
NKs = Ks,
|
||||||
Id = NewId
|
Id = NewId
|
||||||
),
|
),
|
||||||
\+ f(Type, NewId, NKs),
|
(
|
||||||
assert(f(Type, NewId, NKs)).
|
f(Type, NewId, NKs)
|
||||||
|
->
|
||||||
|
true
|
||||||
|
;
|
||||||
|
assert(f(Type, NewId, NKs))
|
||||||
|
).
|
||||||
|
|
||||||
run([Goal|Goals]) :-
|
run([Goal|Goals]) :-
|
||||||
call(user:Goal),
|
call(user:Goal),
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 4d3759739bd256a5a2d0c75ae4921c9147ad5d30
|
Subproject commit 6575e08bd063e0d0476a1bdbfe216684b4d5e6e4
|
Reference in New Issue
Block a user