Commit e9e1af77 authored by Damien Leroux's avatar Damien Leroux
Browse files

Working implementation of hierarchical factor graph generation.

parent ebaefeeb
......@@ -9,3 +9,8 @@ test: test_pop.cc
taco: test_wrapper.cc
g++ -std=c++0x -I$(DAI)/include -L$(DAI)/lib -ggdb $< -ldai -lgmp -o $@
include ../../Makefile.conf
test_graph: test_graph.cc
$C $< -o $@
......@@ -41,7 +41,7 @@ size_t size(const std::vector<size_t>& dim) {
#include "pedigree.h"
/*#include "bayes/bn.h"*/
#include "bayes/factor_var3.h"
#include "bayes/factor_var4.h"
#include "bayes/cli.h"
#include "bayes/dispatch.h"
......
......@@ -7,7 +7,7 @@
/*#include "generation_rs.h"*/
#include "commandline.h"
/*#include "bn.h"*/
#include "factor_var3.h"
#include "factor_var4.h"
#include "file.h"
......@@ -112,7 +112,7 @@ struct bn_settings_t {
cleanup_job_files() const
{
for (const auto& path: job_filenames) {
/*unlink(path.c_str());*/
unlink(path.c_str());
}
}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -840,14 +840,14 @@ struct LV_database {
std::ostream& operator << (std::ostream& os, const LV_database& LV)
{
for (const auto& chr_gen_vec_lv: LV.data) {
MSG_DEBUG("CHROMOSOME " << chr_gen_vec_lv.first);
os << "CHROMOSOME " << chr_gen_vec_lv.first << std::endl;
for (const auto& gen_vec_lv: chr_gen_vec_lv.second) {
MSG_DEBUG("* generation " << gen_vec_lv.first);
os << "* generation " << gen_vec_lv.first << std::endl;
size_t i = 0;
for (const auto& lv: gen_vec_lv.second) {
MSG_DEBUG(" #" << i);
os << " #" << i << std::endl;
++i;
MSG_DEBUG(lv);
os << lv << std::endl;
}
}
}
......@@ -1258,7 +1258,7 @@ struct pop_data_type {
os << "| Generation " << kv.first << std::endl;
/*const auto& family = pop_data.families.find(kv.first)->second;*/
for (const auto& mark_lv: kv.second) {
os << "| Marker " << kv.first << std::endl;
os << "| Marker " << mark_lv.first << std::endl;
for (size_t i = 0; i < mark_lv.second.size(); ++i) {
os << "| #" << i << std::endl;
prepend(os, "| ", mark_lv.second[i].transpose());
......
......@@ -326,7 +326,7 @@ struct pedigree_tree_type {
MSG_DEBUG_DEDENT;
#else
/* Merci à Alexandre Heurteau pour l'idée de la recherche de cycle */
scoped_indent _(MESSAGE("[reentrants(" << node << ")] "));
/*scoped_indent _(MESSAGE("[reentrants(" << node << ")] "));*/
std::vector<bool> visited(m_nodes.size(), false);
std::vector<int> left_ancestors, right_ancestors;
......@@ -378,7 +378,7 @@ struct pedigree_tree_type {
ret[n] = 1;
}
MSG_DEBUG("reentrants = " << ret);
/*MSG_DEBUG("reentrants = " << ret);*/
#endif
return ret;
}
......
This diff is collapsed.
......@@ -72,3 +72,5 @@ $(TARGET): $(OBJ)
$(OBJ):%.o: %.cc
$C -c $< -o $@
test_graph: test_graph.cc ../../include/bayes/graphnode.h
$C -O0 -ggdb $< -o $@
This diff is collapsed.
#include "pedigree.h"
#include "bayes/factor_var3.h"
#include "bayes/factor_var4.h"
#include "bayes/output.h"
#include "cli.h"
#include "dispatch.h"
......
This diff is collapsed.
......@@ -3,7 +3,7 @@
#include "pedigree_tree.h"
#include "data/genoprob_computer2.h"
#include "cache2.h"
#include "bayes/factor_var3.h"
#include "bayes/factor_var4.h"
inline
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment