-/* Copyright (C) 2006-2008 Joris Mooij [j dot mooij at science dot ru dot nl]
- Radboud University Nijmegen, The Netherlands
-
+/* Copyright (C) 2006-2008 Joris Mooij [joris dot mooij at tuebingen dot mpg dot de]
+ Radboud University Nijmegen, The Netherlands /
+ Max Planck Institute for Biological Cybernetics, Germany
+
This file is part of libDAI.
libDAI is free software; you can redistribute it and/or modify
#include <dai/jtree.h>
#include <dai/treeep.h>
#include <dai/util.h>
-#include <dai/diffs.h>
namespace dai {
if( piet.vars() >> ij ) {
piet = piet.marginal( ij );
Factor pietf = piet.marginal(v_i) * piet.marginal(*j);
- wg[UEdge(i,findVar(*j))] = KL_dist( piet, pietf );
+ wg[UEdge(i,findVar(*j))] = dist( piet, pietf, Prob::DISTKL );
} else
wg[UEdge(i,findVar(*j))] = 0;
} else {
void TreeEP::ConstructRG( const DEdgeVec &tree ) {
vector<VarSet> Cliques;
for( size_t i = 0; i < tree.size(); i++ )
- Cliques.push_back( var(tree[i].n1) | var(tree[i].n2) );
+ Cliques.push_back( VarSet( var(tree[i].n1), var(tree[i].n2) ) );
// Construct a weighted graph (each edge is weighted with the cardinality
// of the intersection of the nodes, where the nodes are the elements of