diff --git a/packages/CLPBN/clpbn/bp.yap b/packages/CLPBN/clpbn/bp.yap index f825579ce..37350e56e 100644 --- a/packages/CLPBN/clpbn/bp.yap +++ b/packages/CLPBN/clpbn/bp.yap @@ -63,17 +63,17 @@ call_bp_ground(QueryKeys, AllKeys, Factors, Evidence, Output) :- get_factors_type(Factors, Type), evidence_to_ids(Evidence, Hash, EvidenceIds), factors_to_ids(Factors, Hash, FactorIds), - writeln(type:Type), writeln(''), - writeln(allKeys:AllKeys), writeln(''), - writeln(factors:Factors), writeln(''), - writeln(factorIds:FactorIds), writeln(''), - writeln(evidence:Evidence), writeln(''), - writeln(evidenceIds:EvidenceIds), writeln(''), + %writeln(type:Type), writeln(''), + %writeln(allKeys:AllKeys), writeln(''), + %writeln(factors:Factors), writeln(''), + %writeln(factorIds:FactorIds), writeln(''), + %writeln(evidence:Evidence), writeln(''), + %writeln(evidenceIds:EvidenceIds), writeln(''), create_ground_network(Type, FactorIds, EvidenceIds, Network), %get_vars_information(AllKeys, StatesNames), %set_vars_information(AllKeys, StatesNames), run_solver(ground(Network,Hash), QueryKeys, Solutions), - writeln(answer:Solutions), + %writeln(answer:Solutions), %clpbn_bind_vals([QueryKeys], Solutions, Output). free_ground_network(Network). @@ -82,8 +82,8 @@ run_solver(ground(Network,Hash), QueryKeys, Solutions) :- %get_dists_parameters(DistIds, DistsParams), %set_factors_params(Network, DistsParams), list_of_keys_to_ids(QueryKeys, Hash, QueryIds), - writeln(queryKeys:QueryKeys), writeln(''), - writeln(queryIds:QueryIds), writeln(''), + %writeln(queryKeys:QueryKeys), writeln(''), + %writeln(queryIds:QueryIds), writeln(''), list_of_keys_to_ids(QueryKeys, Hash, QueryIds), run_ground_solver(Network, [QueryIds], Solutions). diff --git a/packages/CLPBN/clpbn/bp/CFactorGraph.cpp b/packages/CLPBN/clpbn/bp/CFactorGraph.cpp index d442209f2..7c7129902 100644 --- a/packages/CLPBN/clpbn/bp/CFactorGraph.cpp +++ b/packages/CLPBN/clpbn/bp/CFactorGraph.cpp @@ -167,7 +167,7 @@ CFactorGraph::createGroups (void) groupsHaveChanged = prevVarGroupsSize != varGroups.size() || prevFactorGroupsSize != facGroups.size(); } - printGroups (varGroups, facGroups); + // printGroups (varGroups, facGroups); createClusters (varGroups, facGroups); } diff --git a/packages/CLPBN/clpbn/bp/CbpSolver.cpp b/packages/CLPBN/clpbn/bp/CbpSolver.cpp index 3373454b6..c6da7bde3 100644 --- a/packages/CLPBN/clpbn/bp/CbpSolver.cpp +++ b/packages/CLPBN/clpbn/bp/CbpSolver.cpp @@ -24,10 +24,6 @@ CbpSolver::CbpSolver (const FactorGraph& fg) : BpSolver (fg) Statistics::updateCompressingStatistics (nGroundVars, nGroundFacs, nClusterVars, nClusterFacs, nWithoutNeighs); } - Util::printHeader ("Uncompressed Factor Graph"); - fg.print(); - Util::printHeader ("Compressed Factor Graph"); - fg_->print(); } diff --git a/packages/CLPBN/clpbn/bp/Makefile.in b/packages/CLPBN/clpbn/bp/Makefile.in index 4cb384f62..13c3f5a88 100644 --- a/packages/CLPBN/clpbn/bp/Makefile.in +++ b/packages/CLPBN/clpbn/bp/Makefile.in @@ -23,10 +23,10 @@ CC=@CC@ CXX=@CXX@ # normal -#CXXFLAGS= -std=c++0x @SHLIB_CXXFLAGS@ $(YAP_EXTRAS) $(DEFS) -D_YAP_NOT_INSTALLED_=1 -I$(srcdir) -I../../../.. -I$(srcdir)/../../../../include @CPPFLAGS@ -DNDEBUG +CXXFLAGS= -std=c++0x @SHLIB_CXXFLAGS@ $(YAP_EXTRAS) $(DEFS) -D_YAP_NOT_INSTALLED_=1 -I$(srcdir) -I../../../.. -I$(srcdir)/../../../../include @CPPFLAGS@ -DNDEBUG # debug -CXXFLAGS= -std=c++0x @SHLIB_CXXFLAGS@ $(YAP_EXTRAS) $(DEFS) -D_YAP_NOT_INSTALLED_=1 -I$(srcdir) -I../../../.. -I$(srcdir)/../../../../include @CPPFLAGS@ -g -O0 -Wextra +#CXXFLAGS= -std=c++0x @SHLIB_CXXFLAGS@ $(YAP_EXTRAS) $(DEFS) -D_YAP_NOT_INSTALLED_=1 -I$(srcdir) -I../../../.. -I$(srcdir)/../../../../include @CPPFLAGS@ -g -O0 -Wextra # @@ -105,10 +105,10 @@ OBJS = \ BpSolver.o \ CbpSolver.o \ FoveSolver.o \ - Parfactor.o \ - ProbFormula.o \ + Parfactor.o \ + ProbFormula.o \ Histogram.o \ - ParfactorList.o \ + ParfactorList.o \ LiftedUtils.o \ Util.o \ HorusYap.o @@ -126,11 +126,11 @@ HCLI_OBJS = \ VarElimSolver.o \ BpSolver.o \ CbpSolver.o \ - FoveSolver.o \ - Parfactor.o \ - ProbFormula.o \ + FoveSolver.o \ + Parfactor.o \ + ProbFormula.o \ Histogram.o \ - ParfactorList.o \ + ParfactorList.o \ LiftedUtils.o \ Util.o \ HorusCli.o diff --git a/packages/CLPBN/clpbn/bp/benchmarks/benchs.sh b/packages/CLPBN/clpbn/bp/benchmarks/benchs.sh index 1ac0547d8..a1ac4cfd6 100755 --- a/packages/CLPBN/clpbn/bp/benchmarks/benchs.sh +++ b/packages/CLPBN/clpbn/bp/benchmarks/benchs.sh @@ -1,6 +1,6 @@ if [ $1 ] && [ $1 == "clear" ]; then - rm *~ + rm -f *~ rm -f school/*.log school/*~ rm -f city/*.log city/*~ rm -f workshop_attrs/*.log workshop_attrs/*~ diff --git a/packages/CLPBN/clpbn/bp/benchmarks/workshop_attrs/people_generator.sh b/packages/CLPBN/clpbn/bp/benchmarks/workshop_attrs/people_generator.sh index a2f1fac42..7a061ed13 100755 --- a/packages/CLPBN/clpbn/bp/benchmarks/workshop_attrs/people_generator.sh +++ b/packages/CLPBN/clpbn/bp/benchmarks/workshop_attrs/people_generator.sh @@ -1,4 +1,4 @@ -#!/home/tiago/bin/yap -L -- +#!/home/tgomes/bin/yap -L -- :- initialization(main). diff --git a/packages/CLPBN/clpbn/bp/benchmarks/workshop_attrs/wa.sh b/packages/CLPBN/clpbn/bp/benchmarks/workshop_attrs/wa.sh index 921ce640c..04636c506 100755 --- a/packages/CLPBN/clpbn/bp/benchmarks/workshop_attrs/wa.sh +++ b/packages/CLPBN/clpbn/bp/benchmarks/workshop_attrs/wa.sh @@ -20,14 +20,14 @@ function run_all_graphs echo "results for solver $1" >> $LOG_FILE echo -n "**********************************" >> $LOG_FILE echo "**********************************" >> $LOG_FILE - run_solver pop_10 $2 - #run_solver pop_1000 $2 - #run_solver pop_5000 $2 - #run_solver pop_10000 $2 - #run_solver pop_50000 $2 - #run_solver pop_100000 $2 - #run_solver pop_500000 $2 - #run_solver pop_1000000 $2 + #run_solver pop_10 $2 + run_solver pop_1000 $2 + run_solver pop_5000 $2 + run_solver pop_10000 $2 + run_solver pop_50000 $2 + run_solver pop_100000 $2 + run_solver pop_500000 $2 + run_solver pop_1000000 $2 } diff --git a/packages/CLPBN/clpbn/fove.yap b/packages/CLPBN/clpbn/fove.yap index 4b293a564..72ad249cf 100644 --- a/packages/CLPBN/clpbn/fove.yap +++ b/packages/CLPBN/clpbn/fove.yap @@ -50,8 +50,8 @@ init_fove_solver(_, AllAttVars, _, fove(ParfactorList, DistIds)) :- get_dist_ids(Parfactors, DistIds0), sort(DistIds0, DistIds), get_observed_vars(AllAttVars, ObservedVars), - writeln(parfactors:Parfactors:'\n'), - writeln(evidence:ObservedVars:'\n'), + %writeln(parfactors:Parfactors:'\n'), + %writeln(evidence:ObservedVars:'\n'), create_lifted_network(Parfactors,ObservedVars,ParfactorList). @@ -140,9 +140,9 @@ get_dists_parameters([Id|Ids], [dist(Id, Params)|DistsInfo]) :- run_fove_solver(QueryVarsAtts, Solutions, fove(ParfactorList, DistIds)) :- get_query_vars(QueryVarsAtts, QueryVars), - writeln(queryVars:QueryVars), writeln(''), + %writeln(queryVars:QueryVars), writeln(''), get_dists_parameters(DistIds, DistsParams), - writeln(dists:DistsParams), writeln(''), + %writeln(dists:DistsParams), writeln(''), set_parfactors_params(ParfactorList, DistsParams), run_lifted_solver(ParfactorList, QueryVars, Solutions).