This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/packages/CLPBN/clpbn/horus.yap

53 lines
1.3 KiB
Plaintext
Raw Normal View History

2012-03-22 19:10:15 +00:00
2012-03-31 23:27:37 +01:00
/*******************************************************
Interface with C++
********************************************************/
2012-03-22 19:10:15 +00:00
:- module(clpbn_horus,
2012-03-31 23:27:37 +01:00
[create_lifted_network/3,
create_ground_network/2,
set_parfactors_params/2,
set_bayes_net_params/2,
run_lifted_solver/3,
run_ground_solver/3,
set_extra_vars_info/2,
set_horus_flag/2,
free_parfactors/1,
free_bayesian_network/1
]).
2012-03-22 19:10:15 +00:00
2012-04-03 15:01:35 +01:00
patch_things_up :-
assert_static(clpbn_horus:set_horus_flag(_,_)).
warning :-
format(user_error,"Horus library not installed: cannot use bp, fove~n.",[]).
2012-04-03 16:22:40 +01:00
:- catch(load_foreign_files([horus], [], init_predicates), _, patch_things_up) -> true ; warning.
2012-04-03 15:01:35 +01:00
2012-03-31 23:27:37 +01:00
%:- set_horus_flag(inf_alg, ve).
:- set_horus_flag(inf_alg, bn_bp).
%:- set_horus_flag(inf_alg, fg_bp).
%: -set_horus_flag(inf_alg, cbp).
:- set_horus_flag(schedule, seq_fixed).
%:- set_horus_flag(schedule, seq_random).
%:- set_horus_flag(schedule, parallel).
%:- set_horus_flag(schedule, max_residual).
:- set_horus_flag(accuracy, 0.0001).
:- set_horus_flag(max_iter, 1000).
:- set_horus_flag(order_factor_variables, false).
%:- set_horus_flag(order_factor_variables, true).
:- set_horus_flag(use_logarithms, false).
% :- set_horus_flag(use_logarithms, true).