Trivial
This commit is contained in:
parent
1bb1138b3a
commit
bd84949f09
@ -44,7 +44,7 @@ call_horus_lifted_solver(QueryVars, AllVars, Output) :-
|
|||||||
init_horus_lifted_solver(_, AllVars, _, state(Network, DistIds)) :-
|
init_horus_lifted_solver(_, AllVars, _, state(Network, DistIds)) :-
|
||||||
get_parfactors(Parfactors),
|
get_parfactors(Parfactors),
|
||||||
get_observed_keys(AllVars, ObservedKeys),
|
get_observed_keys(AllVars, ObservedKeys),
|
||||||
% writeln(network:(parfactors=Parfactors, evidence=ObservedKeys)), nl,
|
%writeln(network:(parfactors=Parfactors, evidence=ObservedKeys)), nl,
|
||||||
cpp_create_lifted_network(Parfactors, ObservedKeys, Network),
|
cpp_create_lifted_network(Parfactors, ObservedKeys, Network),
|
||||||
maplist(get_dist_id, Parfactors, DistIds0),
|
maplist(get_dist_id, Parfactors, DistIds0),
|
||||||
sort(DistIds0, DistIds).
|
sort(DistIds0, DistIds).
|
||||||
@ -74,7 +74,7 @@ is_factor(pf(Id, Ks, Rs, Phi, Tuples)) :-
|
|||||||
maplist(get_range, Ks, Rs),
|
maplist(get_range, Ks, Rs),
|
||||||
Table \= avg,
|
Table \= avg,
|
||||||
gen_table(Table, Phi),
|
gen_table(Table, Phi),
|
||||||
all_tuples(Constraints, Vs, Tuples).
|
all_tuples(Constraints, Vs, Tuples).
|
||||||
|
|
||||||
|
|
||||||
get_range(K, Range) :-
|
get_range(K, Range) :-
|
||||||
|
@ -150,16 +150,16 @@ process_arg(Sk, Id, _I) -->
|
|||||||
},
|
},
|
||||||
[Sk].
|
[Sk].
|
||||||
|
|
||||||
new_skolem(Sk,D) :-
|
new_skolem(Sk, D) :-
|
||||||
copy_term(Sk, Sk1),
|
copy_term(Sk, Sk1),
|
||||||
skolem(Sk1, D1),
|
skolem(Sk1, D1),
|
||||||
functor(Sk1,N,A),
|
functor(Sk1, N, A),
|
||||||
functor(Sk ,N,A),
|
functor(Sk , N, A),
|
||||||
!,
|
!,
|
||||||
( D1 = D -> true ; throw(pfl(permission_error(redefining_domain(Sk),D:D1)))).
|
( D1 = D -> true ; throw(pfl(permission_error(redefining_domain(Sk),D:D1)))).
|
||||||
new_skolem(Sk,D) :-
|
new_skolem(Sk, D) :-
|
||||||
functor(Sk ,N,A),
|
functor(Sk, N, A),
|
||||||
functor(NSk ,N,A),
|
functor(NSk, N, A),
|
||||||
interface_predicate(NSk),
|
interface_predicate(NSk),
|
||||||
assert(skolem(NSk, D)).
|
assert(skolem(NSk, D)).
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user