Removed stuff from InfAlg, moved it to individual inference algorithms
[libdai.git] / example.cpp
index 27c244d..cca85a8 100644 (file)
@@ -44,7 +44,7 @@ int main( int argc, char *argv[] ) {
             double  tol = 1e-9;
             size_t  verb = 1;
 
-            Properties opts;
+            PropertySet opts;
             opts.Set("maxiter",maxiter);
             opts.Set("tol",tol);
             opts.Set("verbose",verb);
@@ -57,11 +57,11 @@ int main( int argc, char *argv[] ) {
             for( size_t i = 0; i < fg.nrVars(); i++ )
                 cout << jt.belief(fg.var(i)) << endl;
 
-            BP bp(fg, opts("updates",string("SEQMAX")));
+            BP bp(fg, opts("updates",string("SEQMAX"))("logdomain",false));
             bp.init();
             bp.run();
 
-            cout << "Exact single node marginals:" << endl;
+            cout << "Approximate (loopy belief propagation) single node marginals:" << endl;
             for( size_t i = 0; i < fg.nrVars(); i++ )
                 cout << bp.belief(fg.var(i)) << endl;
         }