comment debug information in some prolog files
This commit is contained in:
parent
9def6c2b15
commit
5348c4a989
@ -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).
|
||||
|
||||
|
@ -167,7 +167,7 @@ CFactorGraph::createGroups (void)
|
||||
groupsHaveChanged = prevVarGroupsSize != varGroups.size()
|
||||
|| prevFactorGroupsSize != facGroups.size();
|
||||
}
|
||||
printGroups (varGroups, facGroups);
|
||||
// printGroups (varGroups, facGroups);
|
||||
createClusters (varGroups, facGroups);
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -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/*~
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/home/tiago/bin/yap -L --
|
||||
#!/home/tgomes/bin/yap -L --
|
||||
|
||||
|
||||
:- initialization(main).
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
||||
|
@ -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).
|
||||
|
||||
|
Reference in New Issue
Block a user