rename bp.yap and fove.yap
This commit is contained in:
parent
cf929b6f13
commit
9f236dccdd
@ -42,19 +42,19 @@ CLPBN_PROGRAMS= \
|
|||||||
$(CLPBN_SRCDIR)/aggregates.yap \
|
$(CLPBN_SRCDIR)/aggregates.yap \
|
||||||
$(CLPBN_SRCDIR)/bdd.yap \
|
$(CLPBN_SRCDIR)/bdd.yap \
|
||||||
$(CLPBN_SRCDIR)/bnt.yap \
|
$(CLPBN_SRCDIR)/bnt.yap \
|
||||||
$(CLPBN_SRCDIR)/bp.yap \
|
|
||||||
$(CLPBN_SRCDIR)/connected.yap \
|
$(CLPBN_SRCDIR)/connected.yap \
|
||||||
$(CLPBN_SRCDIR)/discrete_utils.yap \
|
$(CLPBN_SRCDIR)/discrete_utils.yap \
|
||||||
$(CLPBN_SRCDIR)/display.yap \
|
$(CLPBN_SRCDIR)/display.yap \
|
||||||
$(CLPBN_SRCDIR)/dists.yap \
|
$(CLPBN_SRCDIR)/dists.yap \
|
||||||
$(CLPBN_SRCDIR)/evidence.yap \
|
$(CLPBN_SRCDIR)/evidence.yap \
|
||||||
$(CLPBN_SRCDIR)/fove.yap \
|
|
||||||
$(CLPBN_SRCDIR)/gibbs.yap \
|
$(CLPBN_SRCDIR)/gibbs.yap \
|
||||||
$(CLPBN_SRCDIR)/graphs.yap \
|
$(CLPBN_SRCDIR)/graphs.yap \
|
||||||
$(CLPBN_SRCDIR)/graphviz.yap \
|
$(CLPBN_SRCDIR)/graphviz.yap \
|
||||||
$(CLPBN_SRCDIR)/ground_factors.yap \
|
$(CLPBN_SRCDIR)/ground_factors.yap \
|
||||||
$(CLPBN_SRCDIR)/hmm.yap \
|
$(CLPBN_SRCDIR)/hmm.yap \
|
||||||
$(CLPBN_SRCDIR)/horus.yap \
|
$(CLPBN_SRCDIR)/horus.yap \
|
||||||
|
$(CLPBN_SRCDIR)/horus_ground.yap \
|
||||||
|
$(CLPBN_SRCDIR)/horus_lifted.yap \
|
||||||
$(CLPBN_SRCDIR)/jt.yap \
|
$(CLPBN_SRCDIR)/jt.yap \
|
||||||
$(CLPBN_SRCDIR)/matrix_cpt_utils.yap \
|
$(CLPBN_SRCDIR)/matrix_cpt_utils.yap \
|
||||||
$(CLPBN_SRCDIR)/pgrammar.yap \
|
$(CLPBN_SRCDIR)/pgrammar.yap \
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
|
|
||||||
|
|
||||||
:- module(clpbn, [{}/1,
|
:- module(clpbn, [{}/1,
|
||||||
clpbn_flag/2,
|
clpbn_flag/2,
|
||||||
set_clpbn_flag/2,
|
set_clpbn_flag/2,
|
||||||
@ -39,7 +38,7 @@
|
|||||||
run_ve_solver/3
|
run_ve_solver/3
|
||||||
]).
|
]).
|
||||||
|
|
||||||
:- use_module('clpbn/bp',
|
:- use_module('clpbn/horus_ground',
|
||||||
[bp/3,
|
[bp/3,
|
||||||
check_if_bp_done/1,
|
check_if_bp_done/1,
|
||||||
init_bp_solver/4,
|
init_bp_solver/4,
|
||||||
@ -48,7 +47,7 @@
|
|||||||
finalize_bp_solver/1
|
finalize_bp_solver/1
|
||||||
]).
|
]).
|
||||||
|
|
||||||
:- use_module('clpbn/fove',
|
:- use_module('clpbn/horus_lifted',
|
||||||
[fove/3,
|
[fove/3,
|
||||||
check_if_fove_done/1,
|
check_if_fove_done/1,
|
||||||
init_fove_solver/4,
|
init_fove_solver/4,
|
||||||
@ -56,7 +55,6 @@
|
|||||||
finalize_fove_solver/1
|
finalize_fove_solver/1
|
||||||
]).
|
]).
|
||||||
|
|
||||||
|
|
||||||
:- use_module('clpbn/jt',
|
:- use_module('clpbn/jt',
|
||||||
[jt/3,
|
[jt/3,
|
||||||
init_jt_solver/4,
|
init_jt_solver/4,
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
|
|
||||||
/*******************************************************
|
/*******************************************************
|
||||||
|
|
||||||
Interface with C++
|
Horus Interface
|
||||||
|
|
||||||
********************************************************/
|
********************************************************/
|
||||||
|
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
|
|
||||||
/*******************************************************
|
/*******************************************************
|
||||||
|
|
||||||
Belief Propagation and Variable Elimination Interface
|
Interface to Horus Ground Solvers. Used by:
|
||||||
|
- Variable Elimination
|
||||||
|
- Belief Propagation
|
||||||
|
- Counting Belief Propagation
|
||||||
|
|
||||||
********************************************************/
|
********************************************************/
|
||||||
|
|
||||||
:- module(clpbn_bp,
|
:- module(clpbn_horus_ground,
|
||||||
[bp/3,
|
[bp/3,
|
||||||
check_if_bp_done/1,
|
check_if_bp_done/1,
|
||||||
init_bp_solver/4,
|
init_bp_solver/4,
|
||||||
@ -14,6 +16,13 @@
|
|||||||
finalize_bp_solver/1
|
finalize_bp_solver/1
|
||||||
]).
|
]).
|
||||||
|
|
||||||
|
:- use_module(horus,
|
||||||
|
[create_ground_network/4,
|
||||||
|
set_factors_params/2,
|
||||||
|
run_ground_solver/3,
|
||||||
|
set_vars_information/2,
|
||||||
|
free_ground_network/1
|
||||||
|
]).
|
||||||
|
|
||||||
:- use_module(library('clpbn/dists'),
|
:- use_module(library('clpbn/dists'),
|
||||||
[dist/4,
|
[dist/4,
|
||||||
@ -22,25 +31,20 @@
|
|||||||
get_dist_params/2
|
get_dist_params/2
|
||||||
]).
|
]).
|
||||||
|
|
||||||
|
|
||||||
:- use_module(library('clpbn/display'),
|
:- use_module(library('clpbn/display'),
|
||||||
[clpbn_bind_vals/3]).
|
[clpbn_bind_vals/3]).
|
||||||
|
|
||||||
|
|
||||||
:- use_module(library('clpbn/aggregates'),
|
:- use_module(library('clpbn/aggregates'),
|
||||||
[check_for_agg_vars/2]).
|
[check_for_agg_vars/2]).
|
||||||
|
|
||||||
|
|
||||||
:- use_module(library(charsio),
|
:- use_module(library(charsio),
|
||||||
[term_to_atom/2]).
|
[term_to_atom/2]).
|
||||||
|
|
||||||
|
|
||||||
:- use_module(library(pfl),
|
:- use_module(library(pfl),
|
||||||
[skolem/2,
|
[skolem/2,
|
||||||
get_pfl_parameters/2
|
get_pfl_parameters/2
|
||||||
]).
|
]).
|
||||||
|
|
||||||
|
|
||||||
:- use_module(library(lists)).
|
:- use_module(library(lists)).
|
||||||
|
|
||||||
:- use_module(library(atts)).
|
:- use_module(library(atts)).
|
||||||
@ -48,15 +52,6 @@
|
|||||||
:- use_module(library(bhash)).
|
:- use_module(library(bhash)).
|
||||||
|
|
||||||
|
|
||||||
:- use_module(horus,
|
|
||||||
[create_ground_network/4,
|
|
||||||
set_factors_params/2,
|
|
||||||
run_ground_solver/3,
|
|
||||||
set_vars_information/2,
|
|
||||||
free_ground_network/1
|
|
||||||
]).
|
|
||||||
|
|
||||||
|
|
||||||
call_bp_ground(QueryVars, QueryKeys, AllKeys, Factors, Evidence, Output) :-
|
call_bp_ground(QueryVars, QueryKeys, AllKeys, Factors, Evidence, Output) :-
|
||||||
b_hash_new(Hash0),
|
b_hash_new(Hash0),
|
||||||
keys_to_ids(AllKeys, 0, Hash0, Hash),
|
keys_to_ids(AllKeys, 0, Hash0, Hash),
|
@ -1,11 +1,11 @@
|
|||||||
|
|
||||||
/*******************************************************
|
/*******************************************************
|
||||||
|
|
||||||
First Order Variable Elimination Interface
|
Interface to Horus Lifted Solvers. Used by:
|
||||||
|
- Lifted Variable Elimination
|
||||||
|
|
||||||
********************************************************/
|
********************************************************/
|
||||||
|
|
||||||
:- module(clpbn_fove,
|
:- module(clpbn_horus_lifted,
|
||||||
[fove/3,
|
[fove/3,
|
||||||
check_if_fove_done/1,
|
check_if_fove_done/1,
|
||||||
init_fove_solver/4,
|
init_fove_solver/4,
|
||||||
@ -13,22 +13,6 @@
|
|||||||
finalize_fove_solver/1
|
finalize_fove_solver/1
|
||||||
]).
|
]).
|
||||||
|
|
||||||
|
|
||||||
:- use_module(library('clpbn/display'),
|
|
||||||
[clpbn_bind_vals/3]).
|
|
||||||
|
|
||||||
|
|
||||||
:- use_module(library('clpbn/dists'),
|
|
||||||
[get_dist_params/2]).
|
|
||||||
|
|
||||||
|
|
||||||
:- use_module(library(pfl),
|
|
||||||
[factor/6,
|
|
||||||
skolem/2,
|
|
||||||
get_pfl_parameters/2
|
|
||||||
]).
|
|
||||||
|
|
||||||
|
|
||||||
:- use_module(horus,
|
:- use_module(horus,
|
||||||
[create_lifted_network/3,
|
[create_lifted_network/3,
|
||||||
set_parfactors_params/2,
|
set_parfactors_params/2,
|
||||||
@ -36,6 +20,18 @@
|
|||||||
free_parfactors/1
|
free_parfactors/1
|
||||||
]).
|
]).
|
||||||
|
|
||||||
|
:- use_module(library('clpbn/display'),
|
||||||
|
[clpbn_bind_vals/3]).
|
||||||
|
|
||||||
|
:- use_module(library('clpbn/dists'),
|
||||||
|
[get_dist_params/2]).
|
||||||
|
|
||||||
|
:- use_module(library(pfl),
|
||||||
|
[factor/6,
|
||||||
|
skolem/2,
|
||||||
|
get_pfl_parameters/2
|
||||||
|
]).
|
||||||
|
|
||||||
|
|
||||||
fove([[]], _, _) :- !.
|
fove([[]], _, _) :- !.
|
||||||
fove([QueryVars], AllVars, Output) :-
|
fove([QueryVars], AllVars, Output) :-
|
Reference in New Issue
Block a user