Merge branch 'eaton'
[libdai.git] / ChangeLog
1 * Added work-around for bug in Boost Graph Library
2 * Improvements of TFactor<T>:
3 - Extended functionality of TFactor<T>::operators +,-,+=,-= to handle different VarSets
4 - Added TFactor<T>::maxMarginal (similar to marginal but with max instead of sum)
5 * Added BipartiteGraph::eraseEdge
6 * Removed all the virtual default constructors *::create(), as they are not used.
7 * Fixed bug in MaxSpanningTree (it wrongly assumed that the tree was not empty).
8 * [Charlie Vaske] Added Expectation Maximization code.
9 * Added MatLab QuickStart to README.
10 * MEX file dai now also returns variable and factor beliefs.
11 * Cleanups and extra documentation of the code contributed by Frederik Eaton
12 * Removed erroneous 'inline' directives in gibbs.cpp
13 * [Frederik Eaton] Added script for automatically generating properties code (used by CBP and BBP)
14 * [Frederik Eaton] Updated doxygen.conf to version 1.5.9
15 * [Frederik Eaton] Added newInfAlgFromString to alldai.h/cpp
16 * [Frederik Eaton] Added FactorGraph::clampVar and FactorGraph::clampFactor
17 * [Frederik Eaton] Changed BP to be able to record order in which messages are sent (for use by BBP)
18 * [Frederik Eaton] Improved documentation of BipartiteGraph::Neighbor
19 * [Frederik Eaton]: Extended InfAlg interface with beliefV() and beliefF() methods;
20 * [Frederik Eaton]: Improved PropertySet class:
21 - Added default constructor
22 - Allow construction from string
23 - Added method allKeys() to produce list of keys
24 - In getStringAs(), check for typeid(ValueType) before typeid(std::string)
25 (this fixes a strange bug for empty string property)
26 * [Frederik Eaton]: Added some utility macros (DAI_PV, DAI_DMSG, DAI_ACCMUT, DAI_IFVERB)
27 and functions (concat(),rnd()) to include/dai/util.h
28 * [Frederik Eaton] Added backwards compatibility layer for edge interface to
29 BipartiteGraph and FactorGraph (which will be obsoleted soon)
30 * [Frederik Eaton] Added BP_dual, BBP and CBP algorithms
31 * [Frederik Eaton] Added Gibbs::state() accessors/mutators
32 * [Frederik Eaton] Fixed Gibbs::getVarDist(size_t) to return uniform
33 distribution if no state is allowed
34 * [Frederik Eaton] Improved parsing code in tests/testdai to allow recursive
35 alias substitutions
36 * Interface changes:
37 TProb<T>::minVal() -> TProb<T>::min()
38 TFactor<T>::minVal() -> TFactor<T>::min()
39 TProb<T>::maxVal() -> TProb<T>::max()
40 TFactor<T>::maxVal() -> TFactor<T>::max()
41 TProb<T>::totalSum() -> TProb<T>sum()
42 TFactor<T>::totalSum() -> TFactor<T>::sum()
43 * [Frederik Eaton] Added methods setUniform (), sumAbs(), argmax() to TProb<T>
44 * [Frederik Eaton] Added TAGS, lib targets to Makefile
45 * [Frederik Eaton] Add useful aliases to aliases.conf
46 * [Frederik Eaton] Removed unnecessary copy constructors and assignment
47 operators
48 * [Frederik Eaton] Change cout to cerr in warnings and error messages
49 * [Giuseppe Passino] Optimised maximum-residual BP by using a reversed ordered
50 set instead of the linear search (which can yield enormous speedups - a
51 factor 500 has been measured on a binary Ising grid with 128x128 variables!)
52 * Added debug assertions to Var which check for inconsistent dimensions of
53 variables with the same labels
54 * [Giuseppe Passino] Added prefix ++ operator to State (State::operator++())
55 * [Giuseppe Passino] Added iterators to FactorGraph (FactorGraph::begin,
56 FactorGraph::end)
57 * [Giuseppe Passino] Added iterators to TFactor (TFactor::begin, TFactor::end)
58 * [Giuseppe Passino] Added iterators to TProb (TProb::begin, TProb::end)
59 * [Giuseppe Passino] Added BP::findMaximum(), which can be used after running
60 max-product BP to construct a global state with maximum probability
61 * Improved Makefile (libDAI now also builds out-of-the-box on MacOSX,
62 thanks to Dan Preston; merged Makefile.win and Makefile.shared into Makefile)
63 * Fixed bug in calcMarginal, calcPairBeliefs, calcPairBeliefsNew where
64 states with zero probability mass were clamped, leading to NaNs or assertion
65 errors (thanks to Dan Preston for reporting this)
66 * toc() now returns POSIX system time with maximum accuracy of microseconds
67 * Exception objects now remember their error code
68 * Added examples/example_sprinkler.cpp
69
70
71 git 065eae35cbfcc36f1a945ae3053c80c23f366306
72 --------------------------------------------
73 * [Peter Gober] Made libDAI build out-of-the-box on Cygwin.
74 * [Frederik Eaton] Added Gibbs sampler to algorithms
75 * Improved documentation of include/dai/{bipgraph.h, prob.h, smallset.h,
76 var.h, varset.h, factor.h, enum.h} and of examples/example.cpp
77 Merged TODO and FILEFORMAT into doxygen documentation
78 * examples/
79 - Moved example.cpp to examples/
80 - Added examples/example_bipgraph.cpp
81 - Added examples/example_varset.cpp
82 * Interface changes:
83 - Replaced TProb<T>::log0() by TProb<T>::log(true)
84 - Replaced TProb<T>::takeLog0() by TProb<T>::takeLog(true)
85 - Replaced TFactor<T>::log0() by TFactor<T>::log(true)
86 - Removed TProb<T>::hasNonPositives()
87 - Renamed smallSet<T> to SmallSet<T>
88 - Removed TFactor<T>::divided_by, use operator/ instead
89 - Removed TFactor<T>::divide, use operator/= instead
90 - Removed TFactor<T>::partSum(const VarSet&), use marginal(const VarSet&,true) instead
91 - Improved constructors of TProb and TFactor to use iterators instead of pointers
92 * Miscellaneous small changes and cleanups:
93 - Changed regression test so that it also works under Windows
94 - Changed output stream operator<< for Var and VarSet
95 - Added TProb::draw() function, which draws a random index
96 - Cleanup of matlab interface code
97 - Small improvement of utils/fginfo
98 - Small cleanup of BP code
99 - Switched Makefile.win to GNU Make syntax
100
101
102 libDAI-0.2.2 (2008-09-30)
103 -------------------------
104
105 New features:
106 * Approximate inference methods now report the number of iterations needed.
107 * Added damping to various algorithms to improve convergence properties.
108 * Added more features to utils/createfg for creating factor graphs.
109 * Added ExactInf class for brute force exact inference.
110 * [Giuseppe Pasino] Added "logdomain" property to BP, a boolean that controls
111 whether calculations are done in the log-domain or in the linear domain;
112 doing calculations in the log-domain may help if the numerical range
113 of a double is too small.
114 * [Claudio Lima] Added Max-Product functionality to BP.
115 * Improved documentation.
116
117 Improved architecture:
118 * Added Exceptions framework.
119 * Pervasive change of BipartiteGraph implementation (based on an idea by
120 Giuseppe Passino). BipartiteGraph no longer stores the node properties
121 (former _V1 and _V2), nor does it store a dense adjacency matrix anymore,
122 nor an edge list. Instead, it stores the graph structure as lists of
123 neighboring nodes. This yields a significant memory/speed improvement for
124 large factor graphs, and is more elegant as well. Iterating over neighbors is
125 made easy by using boost::foreach.
126 * Added conditional compilation of inference methods.
127 * VarSet is now implemented using a std::vector<Var> instead of a
128 std::set<Var>, which yields a significant speed improvement. Furthermore,
129 the implementation has been generalized, resulting in the small_set<T> class
130 which can be used to represent sets of small cardinality; VarSet is the
131 specialization with T = Var.
132 * Improved ClusterGraph implementation, yielding significant speedups
133 for the JunctionTree algorithm on large factorgraphs.
134
135 Code cleanup:
136 * Moved everything into namespace "dai".
137 * Renamed DEBUG to DAI_DEBUG to avoid conflicts.
138 * Replaced ENUM2,ENUM3,ENUM4,ENUM5,ENUM6 by single DAI_ENUM macro.
139 * Removed utils/remove_short_loops and matlab/remove_short_loops.
140 * Replaced sub_nb class in mr.h by boost::dynamic_bitset.
141 * Improved index.h:
142 - Renamed Index -> IndexFor
143 - Added some .reserve()'s to IndexFor methods which yields a
144 25% speedup of testregression
145 - Replaced multind by Permute
146 - Added MultiFor
147 - Added State
148 * New funcstionality of factor.h.
149 * Moved Properties and MaxDiff frameworks from InfAlg to each individual
150 inference algorithm, because the Properties framework was not as
151 convenient as I hoped, and not every inference algorithm needs a maxdiff
152 variable. Also, replaced some FactorGraph functionality in InfAlg by a
153 function that returns the FactorGraph. The result is cleaner (less
154 entangled) code.
155 * Removed x2x.
156 * Replaced Complex with real numbers (negative potentials are just too rare
157 to warrant the additional "complexity" :)).
158
159 Miscellaneous improvements:
160 * Now compiles also with MS Visual C++ (thanks to Jiuxiang Hu) and with
161 GCC under cygwin.
162 * Contributions by Peter Gober:
163 - Renamed variable _N in mr.* for compatibility with g++ under cygwin.
164 * Misc contributions by Giuseppe Passino:
165 - removed "using namespace std;" from header files - bad practice;
166 - moved header files in include/dai and sources in src;
167 - changed #ifndefs to GNU style;
168 - added extra warning checks (-W -Wextra) and fixed resulting warnings;
169 - dai::TProb:
170 o removed copy constructor and assignment operators (redundant);
171 o implementation of some methods via STL algorithms;
172 o added methods takeExp, takeLog, takeLog0 for transformation in-place;
173 o explicit constructor (prevents implicit conversion from size_t to TProb);
174 o added operator+,+=,-,-=, with argument T (for calculations in log-scale);
175 * Misc contributions by Christian Wojek:
176 - New FactorGraph constructor that constructs from given ranges of factors
177 and variables;
178 - Optimization of FactorGraph constructors using tr1::unordered_map.
179 * FactorGraph constructors no longer check for short loops (huge speed
180 increase for large factor graphs), nor for negative entries. Also, the
181 normtype is now Prob::NORMPROB by default.
182 * Improved MaxSpanningTreePrims algorithm (uses boost::graph).
183
184 Interface changes:
185 * VarSet::
186 - VarSet::stateSpace() -> nrStates(const VarSet &)
187 - VarSet( const std::set<Var> ) -> VarSet( begin, end, sizeHint=0 )
188 - VarSet( const std::vector<Var> ) -> VarSet( begin, end, sizeHint=0 )
189 - removed bool operator||
190 - operator&&(const VarSet&) -> intersects(const VarSet&)
191 - operator&&(const Var&) -> contains(const Var&)
192 * FactorGraph::
193 - delta(const Var &) -> delta(size_t)
194 - Delta(const Var &) -> Delta(size_t)
195 - makeCavity(const Var &) -> makeCavity(size_t)
196 - vars() -> vars
197 - factors() -> factors
198 - removed MakeFactorCavity(size_t)
199 - removed ExactMarginal(const VarSet &)
200 - removed ExactlogZ()
201 - removed updatedFactor(size_t)
202 - removed _normtype and NormType()
203 - removed hasShortLoops(...) and removeShortLoops(...)
204 - WriteToDotFile(const char *filename) -> printDot( std::ostream& os )
205 - undoProb(size_t) -> restoreFactor(size_t)
206 - saveProb(size_t) -> backupFactor(size_t)
207 - undoProbs(const VarSet &) -> restoreFactors(const VarSet &)
208 - saveProbs(const VarSet &) -> backupFactors(const VarSet &)
209 - ReadFromFile(const char*) returns void (throws on error)
210 - WriteToFile(const char*) returns void (throws on error)
211 - removed hasNegatives()
212 * RegionGraph::
213 - nr_ORs() -> nrORs()
214 - nr_IRs() -> nrIRs()
215 - ORs() -> ORs
216 - IRs() -> IRs
217 * *::Regenerate() -> *::construct()
218 * Renamed Index -> IndexFor
219 * Diffs:
220 - max() -> maxDiff()
221 - max_size() -> maxSize()
222 * Prob::max() -> Prob::maxVal()
223 * Factor::
224 - max() -> maxVal()
225 - part_sum() -> partSum()
226 * toc() in util.h now returns seconds as a double
227 * VarSet::operator&&
228 * Properties -> PropertySet
229
230
231 libDAI-0.2.1 (2008-05-26)
232 -------------------------
233
234 Bugfix release.
235 * added missing cstdio header in util.h
236 * fixed Properties in MR_CLAMPING_* and MR_EXACT_*
237 * added description of the factor graph fileformat
238 * improved Makefile
239
240
241 libDAI-0.2.0 (2006-11-30)
242 -------------------------
243
244 First public release.
245
246
247 0.1.5 (2006-11-30)
248 ------------------
249
250 Regressions
251
252 - tests/testlcbp and tests/testlcbp are broken.
253 - EXACT method does not work anymore.
254 - The Properties framework gives a speed penalty because of the lookup
255 costs involved; inner loops should be optimized.
256
257 General framework
258
259 - DAIAlg is now a template class; typedefs for DAIAlg<FactorGraph> and for
260 DAIAlg<RegionGraph> are provided. In this way, we do not have to write "wrapper"
261 functions to forward functionality from either FactorGraph or RegionGraph
262 to DAIAlg. Functionality like clamping can be implemented in FactorGraph
263 and in RegionGraph and no explicit interface is needed in descendants.
264 - New abstract base class InfAlg added, representing an inference algorithm,
265 from which DAIAlg<T> inherits. This solves the incompatibility problems of
266 DAIAlg<T> for different T (e.g. DAIAlg<FactorGraph> was incompatible with
267 DAIAlg<RegionGraph>). More work is required to reduce code duplication
268 (make FactorGraph part of InfAlg).
269 - Added generic interface (nrVars(), Vars(), nrFactors(), factor(size_t),
270 beliefs(), belief(VarSet &), ...) to InfAlg and descendants.
271 - Added a saveProbs/undoProbs interface to InfAlg and descendants that enables
272 one to save a few factors, modify them (e.g. clamp them), and then restore them
273 to their old values. Undo should also init the corresponding messages / beliefs.
274 This can be used if a given factor graph repeatedly needs to be clamped in
275 different ways and an approximation method is run for each clamping; using the
276 saveProbs/undoProbs can give a significant speed increase.
277 - Switched to a general Properties framework that handles the parameters of
278 all inference methods in a uniform manner. The Properties class is a map of
279 several properties in boost::any objects, indexed by their names (strings).
280 It can read from a stream and write to a stream. It is recursive, in the sense
281 that a Properties object can hold a variable of type Properties as well.
282 - Added a generic way of constructing inference algorithms from a factor graph,
283 name and properties object. Added the newInfAlg function which constructs
284 the requested object. This is used by LCBP, the Matlab interface and the
285 command line (test) interface.
286 - Added a generic enum framework for enum parameters. Although implemented as a
287 hack, it is quite useful in that it drastically simplifies and reduces the
288 amount of code for handling enum parameters.
289 - Provided generic functions for calculating marginals in different ways that
290 work for all approximate inference methods.
291
292 Bugfixes
293
294 - Fixed GBP free energy.
295 - Fixed bug in junctiontree (it didn't init the _vars variable).
296 - Corrected two bugs in operator&& and operator|| in VarSet (they returned
297 the logical NOT of what they should return).
298 - Fixed bug in RegionGraph::RecomputeOR(s).
299 - Fixed bug in utils/create_dreg_fg:
300 graph structure was not random for given parameters (forgot to call srand()).
301 - TreeEP bug workaround: use the complete junction tree instead of a subtree.
302 - Fixed bug in JTree::HUGIN() and JTree:ShaferShenoy() in case of junction tree
303 that consists of one outer region only.
304 - Fixed INIT bug in LCBP2::UpdatePancake().
305 - Fixed MaxDiffs flow (except for MR).
306
307 New functionality
308
309 - HAK supports several default cluster choices:
310 minimal (only factors)
311 delta (Markov blankets)
312 loop (all loops consisting of loops consisting of <loopdepth> or less variables)
313 Only the maximal clusters are used as outer clusters.
314 - Implemented TreeEP. It generalizes the heuristic method described in the
315 Minka & Qi paper for obtaining a tree with the most relevant interactions to
316 higher order interactions. Almost all optimizations described in the Minka & Qi
317 paper are used, except that evidence is passed over the whole tree instead of
318 relevant subsets (the latter is almost implemented but buggy). Also added
319 alternative (worst-case) algorithm that uses a maximum spanning tree on the
320 weighted graph where the weight between neighbours i and j is given by
321 N(psi,i,j), where psi is the product of all the factors involving both i and j
322 (which is an upper bound on the effective interaction between i and j).
323 - Implemented MR (MontanariRizzo) based on Bastian's code, but extended it
324 to be able to handle connectivities larger than 3 (in principle, up to 32).
325 It supports different initialization methods (the original RESPPROP,
326 the CLAMPING method and EXACT which uses JTree) and different update methods
327 (FULL and LINEAR).
328 - Implemented LCBP2, an analogon of LCBP which represents pancakes as little
329 networks and uses some approximate inference method on them for calculating
330 marginals.
331 - Now there are several LCBP variants (LCBP, LCBPI, LCBPJ, LCBPK, LCBPL);
332 LCBPJ works only for pairwise, LCBPK is LCBP improved for higher order
333 interactions and LCBPL is LCBPI improved for higher-order interactions.
334 - Wrote one single program utils/createfg for creating various types of
335 random factor graphs.
336 - Wrote utility to visualize factor graphs using graphviz.
337 (it uses the BOOST Program Options library)
338 - Added fginfo utility that displays some info about a .fg file.
339 - Implemented Factor::strength function that calculates the potential strength
340 N(psi,i,j) between variables i and j as described in cs.IT:0504030
341 - Wrote a general MatLab interface matlab/dai (similar to tests/test);
342 this unified the matlab functions dai, dai_bp, dai_mf, dai_jt, dai_tep, dai_cvm.
343 - Added MATLAB routine that returns contraction matrix A for BP convergence analysis.
344 - Implemented a MATLAB interface ai_potstrength for Factor::strength
345 - Added Martijn's x2x
346
347 Improvements of existing code
348
349 - Reimplemented RegionGraph and descendants: a RegionGraph ISA FactorGraph
350 and also a BipartiteGraph<FRegion,Region>. It now also keeps a map that
351 associates outer region indices to factor indices (no powers yet, this
352 is deemed superfluous) and provides functions to recompute (some of) the
353 outer regions from the factors.
354 - InfAlg descendants run() methods now stop immediately and return NAN in case
355 they detect NANs. Only BP does not do NAN checking for performance reasons.
356 - LCBP now works with factors containing zeroes (by defining x/0 = 0).
357 - HAK, GBP and DoubleLoop now conform to the standards for verbose reporting,
358 timing and convergence criteria.
359 - Implemented logZ() for JTree. It does the calculation during message-passing.
360 - Marginal2ndO now optionally divides by the single node beliefs (to the power n-2);
361 hopefully this will give more accurate approximations.
362 - Marginal and Marginal2ndO (optionally) use the new saveProbs/undoProbs functionality
363 for a faster way of calculating marginals, which does not require a call to init()
364 nor cloning the whole object for each clamping. This leads to a significant speedup.
365 - LCBP (and LCBP2) now have complete flexibility in the specification of the
366 inner method, i.e. the method used to generate the initial cavity approximations.
367 One can pass two strings, a name and a properties string, and LCBP simply invokes
368 newInfAlg to construct the corresponding inference algorithm and uses the generic
369 marginal functions to approximate cavity marginals.
370 - Replaced the global "method" variable by local properties and removed ai.h
371 - Added some methods to Factor (operators *, *=, /, /= with doubles as
372 second argument, operators -, +=, -= with other Factors as second
373 arguments, randomize(), RemoveFirstOrderInteractions) and similar
374 operations to Prob
375 - Moving towards boost::program_options for handling command line arguments
376 (tests/test is done).
377 - Renamed some FactorGraph methods:
378 nr_vars -> nrVars
379 nr_factors -> nrFactors
380 varind -> findVar
381 factorind -> findFactor
382 makeFacCavity -> makeFactorCavity
383 - LCBP_SEQMAXRES has been removed because it did strange things.
384 - Implemented RandomDRegularGraph
385 - Implemented JTree::calcMarginal for marginals that are not confined
386 within one cluster (using cut-set conditioning).
387 - Added isConnected() method to FactorGraph (some methods do not work with
388 disconnected factor graphs).
389 - Pair beliefs are now calculated in a symmetrical way by calcPairBeliefs
390 - Removed single node interaction "correction" code from clamping methods
391 - Removed calcCavityDist and calcCavityDist2ndO
392 - No longer depends on GSL.
393 - Increased portability by combining platform dependant utility functions
394 in util.{h,cpp}.
395 - Wrote *.m files providing help
396
397 Testing framework
398
399 - Made a new and significantly improved testing framework that provides most
400 functionality from the command line.
401 - The basis is provided by tests/test, which uses the newInfAlg functionality
402 and enables the user to easily compare from the command line different
403 inference methods on a given factorgraph. All parameters can be specified.
404 Output consists of CPU time, average and maximum single variable marginal
405 errors, relative logZ error and MaxDiff().
406 - tests/aliases.conf contains aliases for standard combinations of methods
407 and their options (which can be used in tests/test).
408 - tests/large contains several bash/python scripts that create random factor
409 graphs, compare several approximate inference algorithms (using tests/test) and
410 allow for easy visualization of the results using PyX.
411 - Added several .fg files for test purposes to /tests (e.g. two ALARM versions
412 alarm.fg and alarm_bnt.fg; testfast.fg, a 4x4 periodic Ising grid for
413 regression testing).
414 - Added a regression test to the Makefile which is included in the standard
415 target. It compares all inference methods on tests/testfast.fg with the
416 results stored in tests/testfast.out
417
418 Miscellaneous
419
420 - Expanded all tabs to spaces (":set tabstop 4\n:set expandtab\n:retab" in vim)
421 - Experimental MATLAB code added for StarEP approximation on cavity
422 - Renamed project to libDAI and changed directory name accordingly.
423 - Renamed JunctionTree to JTree.
424 - Fixed licensing (now it's officially GPL).
425 - Improved README
426
427
428 revision 252
429 ------------
430
431 Functionality
432 - Added RegionGraph, GBP, CVM and HAK (double-loop).
433 - Added JunctionTree (with two update algorithms, HUGIN and Shafer-Shenoy), which is a
434 RegionGraph.
435 - NormType is now chosen automatically (in case of negative factors, Prob::NORMLINF is used,
436 otherwise the default Prob::NORMPROB is used). Also, in case of negative factors, the
437 RegionGraph constructors assign each Factor to a unique outer region instead of dividing
438 it over all subsuming outer regions. See README for when negative factors are known to work
439 and when not.
440 - FactorGraph::FactorGraph(const vector<Factor>) only gives a warning in case of short loops,
441 it does not automatically merge factors anymore.
442 - Removed BP_SEQMAXRESNOCLEAR (all cavity initialization methods now are implicitly NOCLEAR)
443 - Added MATLAB interface functions ai_readfg, ai_removeshortloops and ai_bp
444 - Added LCBP-III type that should be equivalent to LCBP-II, but can handle zeroes
445 in potentials. Note that it is significantly slower than LCBP-II (and has to be reimplemented
446 such that it does not store the complete pancakes, but represents them as little factor graphs).
447
448 Implementation / code
449 - Made a seperate type WeightedGraph, which until now only implements Prim's
450 maximal spanning tree algorithm and is only used by the junction tree code. It might
451 be good to make it a class somewhere in the future and extend it's interface.
452 - Made a seperate class ClusterGraph, which is only used by the junction tree
453 code. It's main purpose is a graph-theoretical variable elimination algorithm.
454 - Implemented the heuristic "minimum-new-edges-in-clique-graph" for variable elimination.
455 - Massive code cleanup, moving towards "generic" programming style, using
456 multiple inheritance and polymorphism.
457 o BP, LCBP, MF, HAK and JunctionTree now inherit from a common DAIAlg class
458 o Made generic functions Marginal, Marginal2ndO, calcCavityDist, calcCavityDist2ndO, clamp
459 that can be used by FactorGraph-based DAIAlgs.
460 o Created TProb<T> class, which stores a probability vector (without the accompanying indexing
461 and VarSet) and provides functionality for it (which is used by TFactor<T>).
462 o Rewrote the VarSet class. It now caches its statespace(). It now privately inherits from set<Var>.
463 I had to overload the insert methods of set<Var> so that they calculate the new statespace.
464 o Rewrote the TFactor class. The TFactor class now HAS a TProb and HAS a VarSet.
465 - Rewrote BP to use the new TProb<T> interface. Performance of BP improved up to a factor 6 by:
466 o using Prob's instead of Factor's;
467 o splitting the multiplication of the messages into two parts (thanks to Vicenc!);
468 o optimizing the calculation of the beliefs (only the message calculations were optimized till now).
469 o replacing FactorGraph::_nb1 and _nb2 (which were set<size_t>) by vector<size_t>
470 - LCBP now seperately stores cavitydists and pancakes. Added InitPancakes() method
471 that takes the cavitydists and multiplies them with the relevant factors. This
472 resulted in an API change in AI which now accepts and returns initial cavitydists
473 instead of initial pancakes.
474
475 Minor changes
476 - Started writing DoxyGen documentation
477 - Renamed lcptab2fg.m matlab/ai_writefg.m
478 - Moved all matlab stuff to matlab/
479 - More detailed reporting (also reports clocks used).
480 - Marginal and Marginal2ndO now use *differences* in logZ to avoid NaNs.
481 - Improved testing suite.
482 - Removed logreal support.
483 - FactorGraph now also supports input streams and ignores comment lines in .fg files.
484 - Added tests/create_full_fg.cpp and tests/create_ising_fg.cpp which create
485 full and periodic 2D Ising networks according to some command line parameters.
486 - Now logZ really returns logZ instead of -logZ.
487 - Added FactorGraph::WriteToDotFile
488
489
490 0.1.4 (2006-04-13)
491 ------------------
492 - Added file IO routines to read and write factorgraphs.
493 - Added L-infinity normalization for use with (partially) negative factors.
494 - Renamed BetheF, MFF to logZ, which now use complex numbers to be able to
495 handle (partially) negative factors.
496 - Added test suite.
497 - All probabilities are now represented using double instead of LogReal<double>.
498 - Combined Alg and Alg3 into LCBP. Several update schemes possible.
499 - Combined several variants of BP into doBP. Several update schemes possible.
500 Now uses precalculated indices for optimization.
501 - Renamed Node -> Var and Potential -> Factor.
502 - Extensive code cleanup. More use of OO techniques. Changed API.
503 - MaxIter now means maximum number of passes (corresponding to number of
504 _parallel_ updates).
505 - MaxDiff now means the maximum L-infinity distance between the updated and
506 original single variable beliefs, for all AI methods.
507 - Implemented RBP which converges faster than BP for difficult problems.
508 - Now uses method parameter which is a bitmask combining outmethod and inmethod
509 (see ai.h).
510
511
512 0.1.3 (2006-03-22)
513 --------------------
514 - All AI methods now return maxdiff
515 - ai.cpp:
516 o Now returns maxdiffinner and maxdiffouter
517 o New BP2ndO innermethod (estimate only 2nd order cavity interactions)
518 o New InitCav outermethod (only create initial cavity distributions)
519 - bp.cpp:
520 o New CavityDist2ndO which estimates 2nd order cavity interactions
521 - Makefile:
522 o Bugfix: removed dependencies on algwim.*
523
524
525 0.1.2 (2006-02-28)
526 --------------------
527 - Cleaned up alg.cpp (removed Alg2 and its corresponding data structures).
528 - Added the possibility to provide initial cavity distributions as an input
529 argument to ai (not much error checking is done, so be careful).
530 - Potentials2mx now correctly sets the dimensions of the P field (i.e. for
531 the output arguments Q, Q0 of ai).
532 - Removed algwim.* since it does not work.
533
534
535 0.1.1 (2006-02-28)
536 --------------------
537 - The constructors of (Log)FactorGraph and LogFactorGraph from a
538 vector<(Log)Potential> now merge potentials to prevent short loops (of length
539 4) in the factor graph. These are used in ai to construct the factor graphs
540 from the psi argument. If compiled with DEBUG defined, the method calc_nb()
541 of BipGraph checks for the existence of short loops.
542 - Changed calling syntax of ai (now the actual syntax *does* correspond to its
543 description in the help).
544 - ai does not hook cout anymore (which caused weird segfaults).
545 - Fixed a bug in an assert statement in the matlab interface code in ai.cpp.
546 - Removed network.* since it is not useful.
547
548
549 0.1.0 (2006-02-28)
550 --------------------
551 First version worthy a version number.