-git master HEAD
----------------
+libDAI-0.2.5 (2010-05-09)
+-------------------------
-* Added dag.h/cpp, an implementation for Directed Acyclic Graphs
-* Improved regression test
-* Added examples/example_imagesegmentation
+New features:
+* Added unit tests for var, smallset, varset, graph, dag, bipgraph,
+ weightedgraph, enum, util, exceptions, properties, index, prob,
+ factor, factorgraph, clustergraph, regiongraph, daialg, alldai
* [Ofer Meshi] Added a script for converting from FastInf to libDAI format
-* Made all "verbose" properties optional
-* Unit tests should now also work on WINDOWS
-* [Stefano Pellegrini] Fixed bug in JTree::findMaximum()
-* Fixed some bugs in the MatLab interface build system
-* Fixed a bug in utils/fginfo.cpp
* Added utils/uai2fg, a utility to convert the UAI inference competition file
formats to the libDAI factor graph file format
-* utils/createfg now has a new factor type ('ISINGUNIFORM') and the old
- 'ISING' factor type has been renamed to 'ISINGGAUSS'
-* tests/testdai option "marginals" now has five possible values: NONE
- outputs no marginals, VAR only variable marginals, FAC only factor
- marginals, VARFAC both types of marginals, and ALL outputs all
- marginals calculated by the algorithm.
-* Improved mf.h/cpp:
+* Added dag.h/cpp, an implementation of Directed Acyclic Graphs
+* Added examples/example_imagesegmentation
+
+Miscellaneous improvements:
+* TRWBP:
+ - Added initialization of TRWBP weights by sampling spanning trees
+* MF:
- Added an "init" option that allows to initialize randomly
- Added an "updates" option that allows to choose between standard
mean field and "hard-spin" mean field
-* Improved exactinf.h/cpp:
- - Added ExactInf::findMaximum()
-* Improved treeep.h/cpp:
- - changed TreeEP::construct( const RootedTree& ) into
- TreeEP::construct( const FactorGraph&, const RootedTree& )
+* MR:
+ - rewrote response propagation implementation with help of BBP
+ - now uses GraphAL to represent the Markov graph
+ - miscellaneous smaller cleanups
+* TreeEP:
- Now also supports disconnected factor graphs
-* Improved jtree.h/cpp:
- - changed JTree::construct( const std::vector<VarSet>&, bool ) into
- JTree::construct( const FactorGraph&, const std::vector<VarSet>&, bool )
- - changed JTree::GenerateJT( const std::vector<VarSet> & )
- into JTree::GenerateJT( const FactorGraph &, const std::vector<VarSet> & )
+* JTree:
- Now also supports disconnected factor graphs
- - Fixed a bug in JTree::findMaximum() and simplified the code
-* Improved regiongraph.h/cpp:
- - Made (previously public) members RegionGraph::G, RegionGraph::ORs,
- RegionGraph::IRs and RegionGraph::fac2OR protected.
- - Removed partial constructor RegionGraph::RegionGraph( const FactorGraph& fg )
- - Added some error checking code
- - Renamed RegionGraph::calcCountingNumbers() into
- RegionGraph::calcCVMCountingNumbers() and made it protected, because
- exposing it to the world serves no purpose.
- - Added RegionGraph::DAG() accessor which returns a reference to the
- region graph DAG structure (currently implemented as a BipartiteGraph)
- - Made RegionGraph::RecomputeORs(), RegionGraph::RecomputeORs( const VarSet& )
- and RegionGraph::RecomputeOR( size_t ) protected and renamed them by changing
- the "Recompute" into "recompute", because exposing them to the world serves no
- purpose.
- - RegionGraph::WriteToFile( const char* ), RegionGraph::ReadFromFile( const char * )
- and RegionGraph::printDot( std::ostream& ) incorrectly called their respective
- FactorGraph ancestor methods; this has been corrected by letting them throw a
- NOT_IMPLEMENTED exception.
+* ExactInf:
+ - Added findMaximum()
+* RegionGraph:
+ - Added error checking code
- Changed the way a RegionGraph is streamed to an std::ostream.
-* Improved clustergraph.h/cpp:
- - Made (previously public) members ClusterGraph::G, ClusterGraph::vars and
- ClusterGraph::clusters private and added ClusterGraph::bipGraph(),
- ClusterGraph::vars() and ClusterGraph::clusters() methods which offer
- read-only access to these members.
- - Deprecated ClusterGraph::toVector()
- - Added ClusterGraph::nrVars() method
- - Renamed ClusterGraph::size() method into ClusterGraph::nrClusters()
- - Added ClusterGraph::var( size_t ) method
- - Added ClusterGraph::cluster( size_t ) method
-* Improved factorgraph.h/cpp:
- - FactorGraph::clamped() now contains a delta factor for the clamped variable
- - Renamed FactorGraph::Cliques() into FactorGraph::maximalFactorDomains()
- and made it faster
- - Added FactorGraph::MarkovGraph()
- - Fixed bug in FactorGraph::clone()
- - FactorGraph::findVars( const VarSet& ) now returns a SmallSet<size_t>
+* ClusterGraph:
+ - Added nrVars() method
+ - Added var( size_t ) method
+ - Added cluster( size_t ) method
+* FactorGraph:
+ - clamped() now contains a delta factor for the clamped variable
+ - Added MarkovGraph()
+* TFactor:
+ - Added takeAbs()
+ - Added takeExp()
+ - Added takeLog( bool )
+ - Added operator-() const
+ - Added sumAbs() const
+ - Added operator==( const TFactor<T> &y )
+ - Added get(size_t), set(size_t,T)
+* TProb:
+ - Added operator==( const TProb<T> &q )
+ - accumulate() now also applies op2 to init
+ - operator/= (T x) now yields 0 when dividing by 0
+ - Added resize(size_t)
+ - Added get(size_t) and set(size_t,T)
+ - Changed format of TProb<T> when streamed to an ostream
+* multifor:
+ - Added reset()
+* PropertySet:
+ - Added size()
+ - Added clear()
+ - Added erase()
+* util.h/cpp:
+ - Added std::string toString( const T& x )
+* weightedgraph.h/cpp:
+ - Added option to MaxSpanningTree and MinSpanningTree for
+ choosing between Prim's algorithm and Kruskal's algorithm
+ - Better error checking in RootedTree constructor
+ - Added GraphEL::GraphEL( const GraphAL& G ) constructor
+* BipartiteGraph:
+ - Added hasEdge()
+ - Added findNb1()
+ - Added findNb2()
+ - Added nb1Set()
+ - Added nb2Set()
+ - Added operator==( const BipartiteGraph& )
+ - Added BipartiteGraph( size_t nr1, size_t nr2 ) constructor
+ - Added operator<<( std::ostream&, const BipartiteGraph& )
+* GraphAL:
+ - Added hasEdge(size_t,size_t)
+ - Added nbSet(size_t)
+ - Added operator==( const GraphAL& )
+ - Added operator<<( std::ostream&, const GraphAL& )
+* SmallSet:
+ - Added insert( const T& t ) method
+* Improved regression test
+* Made all "verbose" properties optional
+* utils/createfg now has a new factor type ('ISINGUNIFORM') and the old
+ 'ISING' factor type has been renamed to 'ISINGGAUSS'
+* tests/testdai option "marginals" now has five possible values: NONE
+ outputs no marginals, VAR only variable marginals, FAC only factor
+ marginals, VARFAC both types of marginals, and ALL outputs all
+ marginals calculated by the algorithm.
+* Compressed Makefile
+
+Interface changes (the old interface is marked obsolete and will be removed in the next release):
+* Removed RandomDRegularGraph(), please use createGraphRegular() instead
+* TreeEP:
+ - Changed construct( const RootedTree& ) into
+ construct( const FactorGraph&, const RootedTree& )
+* JTree:
+ - Changed construct( const std::vector<VarSet>&, bool ) into
+ construct( const FactorGraph&, const std::vector<VarSet>&, bool )
+ - Changed GenerateJT( const std::vector<VarSet> & )
+ into GenerateJT( const FactorGraph &, const std::vector<VarSet> & )
+* RegionGraph:
+ - Made (previously public) members G, ORs, IRs and fac2OR protected and
+ added DAG() accessor which returns a reference to the region graph DAG
+ structure (currently implemented as a BipartiteGraph).
+ - Renamed calcCountingNumbers() into calcCVMCountingNumbers() and made it
+ protected, because exposing it to the world serves no purpose.
+ - Removed partial constructor RegionGraph( const FactorGraph& fg )
+ - Made RecomputeORs(), RecomputeORs( const VarSet& ) and RecomputeOR( size_t )
+ protected and renamed them by changing the "Recompute" into "recompute",
+ because exposing them to the world serves no purpose.
+* ClusterGraph:
+ - Made (previously public) members G, vars and clusters private and added
+ bipGraph(), vars() and clusters() methods which offer read-only access
+ to these members.
+ - Deprecated toVector()
+ - Renamed size() into nrClusters()
+* FactorGraph:
+ - Renamed Cliques() into maximalFactorDomains() and made it faster
+ - findVars( const VarSet& ) now returns a SmallSet<size_t>
and its argument now has a const-qualifier (which fixes a small bug).
- - Made (previously public) member FactorGraph::G private and added the
- FactorGraph::bipGraph() method, which offers read-only access to it.
+ - Made (previously public) member G private and added the
+ bipGraph() method, which offers read-only access to it.
- Deprecated the iterator interface:
o FactorGraph::iterator typedef
o FactorGraph::const_iterator typedef
o FactorGraph::begin() members
o FactorGraph::end() members
- - Deprecated FactorGraph::factor(size_t) which offered write access to a factor
+ - Deprecated factor(size_t) which offered write access to a factor
because using this functionality in the descendant RegionGraph is dangerous,
as the outer regions are not automatically recomputed.
-* Improved factor.h/cpp:
- - Fixed bug in min( const TFactor<T> &, const TFactor<T> & )
- - Fixed bug in max( const TFactor<T> &, const TFactor<T> & )
- - Added TFactor<T>::takeAbs()
- - Added TFactor<T>::takeExp()
- - Added TFactor<T>::takeLog( bool )
- - Added TFactor<T>::operator-() const
- - Added TFactor<T>::sumAbs() const
- - Added TFactor<T>::operator==( const TFactor<T> &y )
- - Renamed TFactor<T>::states() into TFactor<T>::nrStates()
- - Added TFactor<T>::get(size_t) and TFactor<T>::set(size_t,T) operators;
+* TFactor:
+ - Renamed states() into nrStates()
+ - Added get(size_t) and set(size_t,T) operators;
get() is equivalent to "operator[](size_t) const" and set() should
be used instead of the non-const operator[], which has been deprecated
-* Improved prob.h/cpp:
- - Deprecated TProb::TProb( TIterator begin, TIterator end, size_t sizeHint=0 )
+* TProb:
+ - Deprecated TProb( TIterator begin, TIterator end, size_t sizeHint=0 )
constructor: the sizeHint argument no longer defaults to 0
- - Deprecated TProb::accumulate( T init, binOp op1, unOp op2 );
- instead, TProb::accumulateSum( T init, unOp op ) and
- TProb::accumulateMax( T init, unOp op, bool minimize ) should be used.
+ - Deprecated accumulate( T init, binOp op1, unOp op2 );
+ instead, accumulateSum( T init, unOp op ) and
+ accumulateMax( T init, unOp op, bool minimize ) should be used.
- Deprecated TProb::NormType and TProb::DistType;
ProbNormType and ProbDistType should be used instead.
- - Added TProb<T>::operator==( const TProb<T> &q )
- - TProb<T>::accumulate() now also applies op2 to init
- - Fixed bug by renaming TProb<T>::operator<=() to TProb<T>::operator<()
- - TProb<T>& operator/= (T x) now yields 0 when dividing by 0
- - Changed format of TProb<T> when streamed to an ostream
- - Added TProb<T>::get(size_t) and TProb<T>::set(size_t,T) operators;
+ - Fixed bug by renaming operator<=() to operator<()
+ - Added get(size_t) and set(size_t,T) operators;
get() is equivalent to "operator[](size_t) const" and set() should
be used instead of the non-const operator[], which has been deprecated
- - Added TProb<T>::resize(size_t)
-* Improved index.h/cpp:
- - Added multifor::reset()
-* Improved properties.h/cpp:
- - Renamed PropertySet::Set() -> PropertySet::set()
- - Renamed PropertySet::Get() -> PropertySet::get()
- - Renamed PropertySet::GetAs<T>() -> PropertySet::getAs<T>()
- - Renamed PropertySet::ConvertTo<T>() -> PropertySet::convertTo<T>()
- - Added PropertySet::size()
- - Added PropertySet::clear()
- - Added PropertySet::erase()
- - Fixed bug in PropertySet::setAsString<T>()
-* Improved util.h/cpp:
- - Added std::string toString( const T& x )
- - Fixed a bug in rnd_seed()
+* PropertySet:
+ - Renamed Set() -> set()
+ - Renamed Get() -> get()
+ - Renamed GetAs<T>() -> getAs<T>()
+ - Renamed ConvertTo<T>() -> convertTo<T>()
+* util.h/cpp:
- Removed max( const std::vector<Real> &v )
-* Improved weightedgraph.h/cpp:
+* weightedgraph.h/cpp:
- Renamed MaxSpanningTreePrims into MaxSpanningTree
- Renamed MinSpanningTreePrims into MinSpanningTree
- - Added option to MaxSpanningTree and MinSpanningTree for
- choosing between Prim's algorithm and Kruskal's algorithm
- - Better error checking in RootedTree constructor
- The vertices in DEdge and UEdge are now named "first" and "second"
for compatibility with a std::pair<size_t,size_t>
- - Added GraphEL::GraphEL( const GraphAL& G ) constructor
-* Improved bipgraph.h/cpp:
- - Fixed bug in BipartiteGraph::eraseNode1()
- - Fixed bug in BipartiteGraph::eraseNode2()
- - Fixed bug in BipartiteGraph::isTree()
- - Added BipartiteGraph::hasEdge()
- - Added BipartiteGraph::findNb1()
- - Added BipartiteGraph::findNb2()
- - Added BipartiteGraph::nb1Set()
- - Added BipartiteGraph::nb2Set()
- - BipartiteGraph::delta1() and BipartiteGraph::delta2() now
- return a SmallSet<size_t> instead of a vector<size_t>
- - Added BipartiteGraph::operator==( const BipartiteGraph& )
- - Added BipartiteGraph( size_t nr1, size_t nr2 ) constructor
- - Added operator<<( std::ostream&, const BipartiteGraph& )
-* Improved graph.h/cpp:
- - Fixed bug in GraphAL::nrEdges()
- - Fixed bug in GraphAL::addEdge()
- - Fixed bug in GraphAL::isTree()
- - Fixed bug in GraphAL::eraseNode()
- - Fixed bug in GraphAL::printDot()
- - Fixed bug in createGraphGrid3D()
- - Fixed bug in createGraphRegular()
- - Added GraphAL::hasEdge(size_t,size_t)
- - Added GraphAL::nbSet(size_t)
- - Added GraphAL::operator==( const GraphAL& )
- - Added operator<<( std::ostream&, const GraphAL& )
-* Improved smallset.h/cpp:
+* BipartiteGraph:
+ - delta1() and delta2() now return a SmallSet<size_t> instead of a vector<size_t>
+* SmallSet:
- The sizeHint argument of the iterator constructor
SmallSet::SmallSet( TIterator begin, TIterator end, size_t sizeHint=0 )
no longer has a default value in order to avoid confusion with the
SmallSet::SmallSet( const T &t1, const T &t2 )
constructor.
- - Added SmallSet::insert( const T& t ) method
-* Removed RandomDRegularGraph(), please use createGraphRegular() instead
-* Compressed Makefile
-* Added unit tests for var, smallset, varset, graph, bipgraph,
- weightedgraph, enum, util, exceptions, properties, index, prob,
- factor, factorgraph, clustergraph, regiongraph, daialg, alldai
-* Added unit testing framework
-* Added initialization of TRWBP weights by sampling spanning trees
-* Cleaned up MR code:
- - rewrote response propagation implementation with help of BBP
- - now uses GraphAL to represent the Markov graph
- - miscellaneous smaller cleanups
+
+Bug fixes:
+* [Stefano Pellegrini] Fixed bug in JTree::findMaximum()
+* [Stefano Pellegrini] Fixed bug in BP[logdomain=1,inference=MAXPROD]
+* Fixed some bugs in the MatLab interface build system
+* Fixed a bug in utils/fginfo.cpp
+* Fixed a bug in JTree::findMaximum() and simplified the code
* Fixed bug in BBPCostFunction::operator=() which prevented the desired
assignment from happening
-* [Stefano Pellegrini] Fixed bug in BP[logdomain=1,inference=MAXPROD]
-* Removed deprecated functionality
-* Updated ChangeLog for libDAI-0.2.4 (forgot a few entries)
+* RegionGraph::WriteToFile( const char* ), RegionGraph::ReadFromFile( const char * )
+ and RegionGraph::printDot( std::ostream& ) incorrectly called their respective
+ FactorGraph ancestor methods; this has been corrected by letting them throw a
+ NOT_IMPLEMENTED exception.
+* Fixed bug in FactorGraph::clone()
+* Fixed bug in min( const TFactor<T> &, const TFactor<T> & )
+* Fixed bug in max( const TFactor<T> &, const TFactor<T> & )
+* Fixed bug by renaming TProb<T>::operator<=() to TProb<T>::operator<()
+* Fixed bug in PropertySet::setAsString<T>()
+* Fixed a bug in rnd_seed()
+* BipartiteGraph:
+ - Fixed bug in eraseNode1()
+ - Fixed bug in eraseNode2()
+ - Fixed bug in isTree()
+* GraphAL:
+ - Fixed bug in nrEdges()
+ - Fixed bug in addEdge()
+ - Fixed bug in isTree()
+ - Fixed bug in eraseNode()
+ - Fixed bug in printDot()
+* Fixed bug in createGraphGrid3D()
+* Fixed bug in createGraphRegular()
libDAI-0.2.4 (2010-02-11)
Miscellaneous improvements:
* Now compiles also with MS Visual C++ (thanks to Jiuxiang Hu) and with
- GCC under cygwin.
+ GCC under Cygwin.
* Contributions by Peter Gober:
- - Renamed variable _N in mr.* for compatibility with g++ under cygwin.
+ - Renamed variable _N in mr.* for compatibility with g++ under Cygwin.
* Misc contributions by Giuseppe Passino:
- removed "using namespace std;" from header files - bad practice;
- moved header files in include/dai and sources in src;
-------------------------------------------------------------------------------
-Version: git HEAD
-Date: April 1, 2010 - or later
+Version: 0.2.5
+Date: May 9, 2010
See also: http://www.libdai.org
-------------------------------------------------------------------------------
Citing libDAI
If you write a scientific paper describing research that made substantive use
-of this program, please:
-
- * mention the fashion in which this software was used, including the version
- number, with a citation to the literature, to allow replication;
- * mention this software in the Acknowledgements section.
+of this program, please cite the software appropriately, by mentioning the
+fashion in which this software was used, including the version number.
An appropriate citation would be:
}
-Moreover, as a personal note, I would appreciate it if you would email
-(citations of) papers referencing this work to joris dot mooij at libdai dot org.
+Moreover, as a personal note, I would appreciate it to be informed about any
+publications using libDAI at joris dot mooij at libdai dot org.
-------------------------------------------------------------------------------
Compatibility
The code has been developed under Debian GNU/Linux with the GCC compiler suite.
-libDAI compiles successfully with g++ versions 3.4, 4.1, 4.2 and 4.3.
+libDAI compiles successfully with g++ versions 3.4 up to 4.4.
libDAI has also been successfully compiled with MS Visual Studio 2008 under
Windows (but not all build targets are supported yet) and with Cygwin under
The Google group "libDAI" (http://groups.google.com/group/libdai) can be used
for getting support and discussing development issues.
+
-------------------------------------------------------------------------------
Building libDAI under UNIX variants (Linux / Cygwin / Mac OS X)
* a recent version of gcc (at least version 3.4)
* GNU make
- * doxygen
- * graphviz
- * recent boost C++ libraries (at least version 1.34 if you have a recent
- version of GCC, otherwise at least version 1.37; however, version 1.37
+ * recent boost C++ libraries (at least version 1.37; however, version 1.37
shipped with Ubuntu 9.04 is known not to work)
+ * doxygen (only for building the documentation)
+ * graphviz (only for using some of the libDAI command line utilities)
-On Debian/Ubuntu, you can easily install all these packages with a single
+On Debian/Ubuntu, you can easily install the required packages with a single
command:
- apt-get install g++ make doxygen graphviz libboost-dev libboost-graph-dev libboost-program-options-dev
+ apt-get install g++ make doxygen graphviz libboost-dev libboost-graph-dev libboost-program-options-dev libboost-test-dev
(root permissions needed).
On Cygwin, the prebuilt Cygwin package boost-1.33.1-x is known not to work. You
can however obtain the latest boost version (you need at least 1.37.0) from
-http://www.boost.org/ and compile/install it with:
+http://www.boost.org/ and build it as described in the next subsection.
- ./configure
- make
- make install
+Building boost under Cygwin
+
+ * Download the latest boost libraries from http://www.boost.org
+ * Build the required boost libraries using:
+
+ ./bootstrap.sh --with-libraries=program_options,math,graph,test --prefix=/boost_root/
+ ./bjam
+
+ * In order to use dynamic linking, the boost .dll's should be somewhere in
+ the path. This can be achieved by a command like:
+ export PATH=$PATH:/boost_root/stage/lib
Building libDAI
* GNU diff, GNU sed (can be obtained from http://gnuwin32.sourceforge.net)
+Building boost under Windows
+
+Because building boost under Windows is tricky, I provide some guidance here.
+
+ * Download the boost zip file from http://www.boost.org/users/download and
+ unpack it somewhere.
+ * Download the bjam executable from http://www.boost.org/users/download and
+ unpack it somewhere else.
+ * Download Boost.Build (v2) from http://www.boost.org/docs/tools/build/
+ index.html and unpack it yet somewhere else.
+ * Edit the file boost-build.jam in the main boost directory to change the
+ BOOST_BUILD directory to the place where you put Boost.Build (use UNIX /
+ instead of Windows \ in pathnames).
+ * Copy the bjam.exe executable into the main boost directory. Now if you
+ issue "bjam --version" you should get a version and no errors. Issueing
+ "bjam --show-libraries" will show the libraries that will be built.
+ * The following command builds the boost libraries that are relevant for
+ libDAI:
+
+ bjam --with-graph --with-math --with-program_options --with-test link=static runtime-link=shared
+
Building libDAI
To build the source, copy Makefile.WINDOWS to Makefile.conf. Then, edit
to build the documentation. If the documentation is not clear enough, feel free
to send me an email (or even better, to improve the documentation and send a
patch!). The documentation can also be browsed online at http://www.libdai.org.
+
* \idea Use boost::uBLAS framework to deal with matrices, especially, with 2D sparse matrices.
* See http://www.boost.org/libs/numeric/ublas/doc/matrix_sparse.htm
* However: I read somewhere that boost::uBLAS concentrates more on correct implementation than on performance.
- *
- * \idea Introduce naming scheme:
- * - all Vars should be named v_..., e.g. v_i instead of i
- * - all VarSets should be named vs_..., e.g. v_i instead of i
- * - all Factors should be named f_..., e.g. f_I instead of I
- * - all indices should be named _..., e.g. _k instead of k
- * - all iterators should be named i_, e.g. i_i is an iterator to i
- * - all const_iterators should be named ci_, e.g. ci_i is an iterator to i
**/
/** \mainpage Reference manual for libDAI - A free/open source C++ library for Discrete Approximate Inference methods
* \author Joris Mooij, Frederik Eaton
- * \version git HEAD
- * \date April 1, 2010 - or later
+ * \version 0.2.5
+ * \date May 9, 2010
*
* <hr size="1">
* \section about About libDAI
* \section compatibility Compatibility
*
* The code has been developed under Debian GNU/Linux with the GCC compiler suite.
- * libDAI compiles successfully with g++ versions 3.4, 4.1, 4.2 and 4.3.
+ * libDAI compiles successfully with g++ versions 3.4 up to 4.4.
*
* libDAI has also been successfully compiled with MS Visual Studio 2008 under Windows
* (but not all build targets are supported yet) and with Cygwin under Windows.
* \section citations-citations Citing libDAI
*
* If you write a scientific paper describing research that made substantive use
- * of this program, please:
- * - mention the fashion in which this software was
- * used, including the version number, with a citation to the literature,
- * to allow replication;
- * - mention this software in the Acknowledgements section.
+ * of this program, please cite the software appropriately, by mentioning the
+ * fashion in which this software was used, including the version number.
*
* An appropriate citation would be:\n
*
* }
* </pre>
*
- * Moreover, as a personal note, I would appreciate it if you would email
- * (citations of) papers referencing this work to joris dot mooij at libdai dot org.
+ * Moreover, as a personal note, I would appreciate it to be informed about any
+ * publications using libDAI at joris dot mooij at libdai dot org.
*/
* You need:
* - a recent version of gcc (at least version 3.4)
* - GNU make
- * - doxygen
- * - graphviz
- * - recent boost C++ libraries (at least version 1.34 if you have
- * a recent version of GCC, otherwise at least version 1.37; however,
+ * - recent boost C++ libraries (at least version 1.37; however,
* version 1.37 shipped with Ubuntu 9.04 is known not to work)
+ * - doxygen (only for building the documentation)
+ * - graphviz (only for using some of the libDAI command line utilities)
*
- * On Debian/Ubuntu, you can easily install all these packages with a single command:
- * <pre> apt-get install g++ make doxygen graphviz libboost-dev libboost-graph-dev libboost-program-options-dev</pre>
+ * On Debian/Ubuntu, you can easily install the required packages with a single command:
+ * <pre> apt-get install g++ make doxygen graphviz libboost-dev libboost-graph-dev libboost-program-options-dev libboost-test-dev</pre>
* (root permissions needed).
*
* On Mac OS X (10.4 is known to work), these packages can be installed easily via MacPorts.
*
* On Cygwin, the prebuilt Cygwin package boost-1.33.1-x is known not to work.
* You can however obtain the latest boost version (you need at least 1.37.0)
- * from http://www.boost.org/ and compile/install it with:
+ * from http://www.boost.org/ and build it as described in the next subsection.
+ *
+ * \subsubsection build-unix-boost Building boost under Cygwin
+ *
+ * - Download the latest boost libraries from http://www.boost.org
+ * - Build the required boost libraries using:
+ * <pre>
+ * ./bootstrap.sh --with-libraries=program_options,math,graph,test --prefix=/boost_root/
+ * ./bjam</pre>
+ * - In order to use dynamic linking, the boost .dll's should be somewhere in the path.
+ * This can be achieved by a command like:
+ * <pre>
+ * export PATH=$PATH:/boost_root/stage/lib</pre>
*
- * <pre> ./configure
- * make
- * make install
- * </pre>
*
* \subsection build-unix-libdai Building libDAI
*
* For the regression test, you need:
* - GNU diff, GNU sed (can be obtained from http://gnuwin32.sourceforge.net)
*
+ * \subsubsection build-windows-boost Building boost under Windows
+ *
+ * Because building boost under Windows is tricky, I provide some guidance here.
+ *
+ * - Download the boost zip file from http://www.boost.org/users/download
+ * and unpack it somewhere.
+ * - Download the bjam executable from http://www.boost.org/users/download
+ * and unpack it somewhere else.
+ * - Download Boost.Build (v2) from http://www.boost.org/docs/tools/build/index.html
+ * and unpack it yet somewhere else.
+ * - Edit the file \c boost-build.jam in the main boost directory to change the
+ * \c BOOST_BUILD directory to the place where you put Boost.Build (use UNIX
+ * / instead of Windows \ in pathnames).
+ * - Copy the \c bjam.exe executable into the main boost directory.
+ * Now if you issue <tt>"bjam --version"</tt> you should get a version and no errors.
+ * Issueing <tt>"bjam --show-libraries"</tt> will show the libraries that will be built.
+ * - The following command builds the boost libraries that are relevant for libDAI:
+ * <pre>
+ * bjam --with-graph --with-math --with-program_options --with-test link=static runtime-link=shared</pre>
+ *
* \subsection build-windows-libdai Building libDAI
*
* To build the source, copy Makefile.WINDOWS to Makefile.conf. Then, edit