+* [Laurens van der Maaten] src/matlab/dai.cpp now correctly handles missing logZ() and maxDiff() implementations
* Improved dai::Exception object (it now stores more information and doesn't print to stderr by default)
* Added builtinInfAlgs() and builtinInfAlgNames()
* Now uses GMP big integer type to represent linear states and the number of
no longer works out-of-the-box.
* Changed license from GPL v2+ to FreeBSD (BSD 2-clause)
* Fixed numerical issues in MF, FBP and TRWBP (discovered in sparse branch)
-* Jerome Maye found a bug in the State() class in index.h; implemented
- a workaround for the moment
+* Jerome Maye and Prija independently found a bug in the State() class in index.h;
+ implemented a workaround for the moment
* Fixed bug in findMaximum(): inconsistent max-beliefs are now detected,
instead of returning a MAP state with zero joint probability
(reported by Hynek Urban)
# Output filename option of the compiler
CCO=-o
# Flags for the C++ compiler
-CCFLAGS=-Wno-deprecated -Wall -W -Wextra -fPIC -DMACOSX
+CCFLAGS=-Wno-deprecated -Wall -W -Wextra -fPIC -DMACOSX -arch i386
# Flags to add in debugging mode (if DEBUG=true)
CCDEBUGFLAGS=-O3 -g -DDAI_DEBUG
# Flags to add in non-debugging mode (if DEBUG=false)
# LINKER
# Standard libraries to include
-LIBS=-ldai -lgmpxx -lgmp
+LIBS=-ldai -lgmpxx -lgmp -arch i386
# For linking with BOOST libraries
BOOSTLIBS_PO=-lboost_program_options
BOOSTLIBS_UTF=-lboost_unit_test_framework
obj->run();
// Save logZ
- double logZ = obj->logZ();
+ double logZ = NAN;
+ try {
+ logZ = obj->logZ();
+ }
+ catch( Exception &e ) {
+ if( e.getCode() == Exception::NOT_IMPLEMENTED )
+ mexWarnMsgTxt("Calculating the log-partition function is not supported by this inference algorithm.");
+ else
+ throw;
+ }
// Save maxdiff
- double maxdiff = obj->maxDiff();
+ double maxdiff = NAN;
+ try {
+ maxdiff = obj->maxDiff();
+ }
+ catch( Exception &e ) {
+ if( e.getCode() == Exception::NOT_IMPLEMENTED )
+ mexWarnMsgTxt("Calculating the max-differences is not supported by this inference algorithm.");
+ else
+ throw;
+ }
// Hand over results to MATLAB
LOGZ_OUT = mxCreateDoubleMatrix(1,1,mxREAL);
qmap_p[n] = map_state[n];
} else {
delete obj;
- mexErrMsgTxt("Calculating a MAP state is not supported by this inference algorithm");
+ mexErrMsgTxt("Calculating a MAP state is not supported by this inference algorithm.");
}
}
delete obj;
+
return;
}