libdai.git
11 years agoMerged bp.h and bp.cpp from SVN head
Joris Mooij [Fri, 26 Sep 2008 17:12:49 +0000 (19:12 +0200)]
Merged bp.h and bp.cpp from SVN head

11 years agoMerged mf.* from SVN head (which implements damping)...
Joris Mooij [Fri, 26 Sep 2008 14:16:41 +0000 (16:16 +0200)]
Merged mf.* from SVN head (which implements damping)...
...and renamed the create() methods to construct() to avoid confusion
with the virtual constructor which is also called create()

11 years agoMerged tests/*, matlab/*, utils/* from SVN head...
Joris Mooij [Fri, 26 Sep 2008 11:24:07 +0000 (13:24 +0200)]
Merged tests/*, matlab/*, utils/* from SVN head...

...and:
- removed LC::Properties::CavityType::PAIRINT and PAIRCUM
- added LDPC method to tests/test

11 years agoMerged regiongraph.* and daialg.* from SVN head,
Joris Mooij [Fri, 26 Sep 2008 09:44:29 +0000 (11:44 +0200)]
Merged regiongraph.* and daialg.* from SVN head,
and did some small fixes here and there

11 years agoFixed previous partial commit which left everything broken
Joris Mooij [Fri, 26 Sep 2008 07:53:29 +0000 (09:53 +0200)]
Fixed previous partial commit which left everything broken

11 years agoMerged prob.h, factorgraph.h, factograph.cpp from SVN head (broken!)
Joris Mooij [Fri, 26 Sep 2008 05:31:48 +0000 (07:31 +0200)]
Merged prob.h, factorgraph.h, factograph.cpp from SVN head (broken!)

11 years agoMerged factor.h from SVN head
Joris Mooij [Wed, 24 Sep 2008 13:24:40 +0000 (15:24 +0200)]
Merged factor.h from SVN head

11 years agoMerge branch 'master' of git@git.tuebingen.mpg.de:libdai
Joris Mooij [Wed, 24 Sep 2008 12:54:22 +0000 (14:54 +0200)]
Merge branch 'master' of git@git.tuebingen.mpg.de:libdai

11 years agoSmall changes
Joris Mooij [Wed, 24 Sep 2008 12:54:06 +0000 (14:54 +0200)]
Small changes

11 years ago- Solved the proliferation of type checks for different DAI_ENUM's in properties.cpp
Joris Mooij [Wed, 24 Sep 2008 08:23:28 +0000 (10:23 +0200)]
- Solved the proliferation of type checks for different DAI_ENUM's in properties.cpp

The most elegant solution would be to adapt boost::any such that it can
stream a held object to an output stream if the object is streamable.
However, this would require surgery in boost::any (see
http://lists.boost.org/MailArchives/boost/msg78317.php for a discussion
of how to do this), which I consider to be an important disadvantage.

Another possible solution would be to replace boost::any by some class
hierarchy and to store properties as pointers to the base property
class, using inheritance based polymorphism to allow different types of
properties. The main disadvantage of this solution is that a lot of
boiler-plate code has to be written.

The current solution is the addition of a printProperties() method to
each class, which outputs its Props to a std::string. This is used by
the identify() method. The main disadvantage of this method is, that it
requires yet another explicit enumeration of all properties in the code,
which makes maintenance yet more costly. However, this solution is
consistent with the approach of using individual Props structures
instead of a PropertySet object.

11 years agoAdded ExactInf class for doing brute force exact inference...
Joris Mooij [Tue, 23 Sep 2008 10:41:06 +0000 (12:41 +0200)]
Added ExactInf class for doing brute force exact inference...

... and:
- Cleaned up and synched Makefiles
- Improved example
- Added --marginals option to tests/test

11 years agoRemoved remove_short_loops functionality.
Joris Mooij [Tue, 23 Sep 2008 06:25:27 +0000 (08:25 +0200)]
Removed remove_short_loops functionality.

11 years agoReplaced ENUM2,ENUM3,ENUM4,ENUM5,ENUM6 by single DAI_ENUM macro.
Joris Mooij [Tue, 23 Sep 2008 06:04:12 +0000 (08:04 +0200)]
Replaced ENUM2,ENUM3,ENUM4,ENUM5,ENUM6 by single DAI_ENUM macro.

11 years agoSmall doc changes
Joris Mooij [Mon, 22 Sep 2008 06:35:48 +0000 (08:35 +0200)]
Small doc changes

11 years agoMerge branch 'master' of git@git.tuebingen.mpg.de:libdai
Joris Mooij [Sun, 21 Sep 2008 07:35:08 +0000 (09:35 +0200)]
Merge branch 'master' of git@git.tuebingen.mpg.de:libdai

Conflicts:

include/dai/lc.h
include/dai/mr.h
src/alldai.cpp
src/lc.cpp
tests/test.cpp

11 years agoRemoved stuff from InfAlg, moved it to individual inference algorithms
Joris Mooij [Sun, 21 Sep 2008 07:28:02 +0000 (09:28 +0200)]
Removed stuff from InfAlg, moved it to individual inference algorithms

- Renamed Properties -> PropertySet
- Removed Properties framework from InfAlg and added properties,
encapsulated in a struct called Properties, to each inference algorithm
- Moved maxdiff functionality from InfAlg to individual inference algorithms

11 years agoSeveral small changes
Joris Mooij [Fri, 19 Sep 2008 12:24:19 +0000 (14:24 +0200)]
Several small changes

- Added BipGraph::addEdge(...)
- Removed *::updatedFactor(...)
- Removed FactorGraph::_normtype and FactorGraph::NormType()

11 years agoReplaced complex numbers by real numbers
Joris Mooij [Fri, 19 Sep 2008 11:23:20 +0000 (13:23 +0200)]
Replaced complex numbers by real numbers

11 years agoReplaced some FactorGraph functionality in InfAlg by a function
Joris Mooij [Fri, 19 Sep 2008 10:58:32 +0000 (12:58 +0200)]
Replaced some FactorGraph functionality in InfAlg by a function
that returns a reference to a FactorGraph.

11 years agoAdded Exceptions framework (and more)
Joris Mooij [Fri, 19 Sep 2008 09:59:51 +0000 (11:59 +0200)]
Added Exceptions framework (and more)

- Updated ChangeLog and STATUS
- Added exceptions.h/cpp from SVN head
- Removed all remaining NANs
- Added --report-time option to tests/test,
  which allows for simplifications in tests/testregression.

11 years agoFixed NAN related bugs for Visual C++.
Joris Mooij [Thu, 18 Sep 2008 14:58:45 +0000 (16:58 +0200)]
Fixed NAN related bugs for Visual C++.

11 years agoNow compiles also with Visual Studio 2008 under Windows (still buggy!)
Joris Mooij [Thu, 18 Sep 2008 08:40:52 +0000 (10:40 +0200)]
Now compiles also with Visual Studio 2008 under Windows (still buggy!)

- Merged utils/createfg from SVN head
- Added Makefile.win for Visual Studio and fixed some bugs;
  HAK doesn't work yet, because of problems with NANs.

11 years agoFixed nasty bug in BipartiteGraph::erase1 and erase2
Joris Mooij [Mon, 15 Sep 2008 10:20:12 +0000 (12:20 +0200)]
Fixed nasty bug in BipartiteGraph::erase1 and erase2

- Fixed bug in example.cpp (logdomain option was missing)
- Moved some code from the BipartiteGraph header to a
  new source file src/bipgraph.cpp
- Added some consistency checks to BipartiteGraph

11 years agoTwo small bugfixes
Joris Mooij [Sat, 13 Sep 2008 17:00:16 +0000 (19:00 +0200)]
Two small bugfixes

11 years agoMerged var.h and varset.h from SVN head
Joris Mooij [Sat, 13 Sep 2008 16:49:18 +0000 (18:49 +0200)]
Merged var.h and varset.h from SVN head

- Merged var.h from SVN head
- Merged varset.h from SVN head, which uses vector<Var> as implementation
  for a VarSet instead of a set<Var>, which yields a 30% speed improvement
  for testregression

11 years agoImproved BipartiteGraph doxygen documentation.
Joris Mooij [Thu, 11 Sep 2008 08:46:34 +0000 (10:46 +0200)]
Improved BipartiteGraph doxygen documentation.

11 years agoImproved ClusterGraph implementation and MaxSpanningTreePrims implementation.
Joris Mooij [Thu, 11 Sep 2008 07:36:23 +0000 (09:36 +0200)]
Improved ClusterGraph implementation and MaxSpanningTreePrims implementation.

- Added several methods to BipartiteGraph
- Improved ClusterGraph implementation (taken from SVN head)
- Improved MaxSpanningTree algorithm (using boost::graph library, taken from SVN head)

11 years agoMiscellaneous changes:
Joris Mooij [Tue, 9 Sep 2008 14:18:07 +0000 (16:18 +0200)]
Miscellaneous changes:

- Improved compatibility with Windows platform
- Merged util.h/util.cpp from SVN head.
- Updated doxygen.conf and fixed remaining doxygen warnings.

11 years agoAdded "logdomain" property to BP.
Joris Mooij [Tue, 9 Sep 2008 09:42:19 +0000 (11:42 +0200)]
Added "logdomain" property to BP.

This is a boolean that controls whether calculations are done in the
log-domain or in the linear domain; doing calculations in the log-domain
may help if the numerical range of a double is too small.

11 years agoImproved index.h (merged from SVN head), which yields a 25% speedup.
Joris Mooij [Mon, 8 Sep 2008 17:36:10 +0000 (19:36 +0200)]
Improved index.h (merged from SVN head), which yields a 25% speedup.

Also, added some copyrights for Martijn Leisink.

11 years agoSmall misc changes
Joris Mooij [Mon, 8 Sep 2008 16:49:46 +0000 (18:49 +0200)]
Small misc changes

- Renamed VarSet::stateSpace() -> VarSet::states()
- Renamed *::Regenerate() -> *::create()
- Optimized Diffs (merged version from SVN head)

11 years agoMerge branch 'no-edges2'
Joris Mooij [Mon, 8 Sep 2008 14:18:16 +0000 (16:18 +0200)]
Merge branch 'no-edges2'

11 years agoPervasive change of BipartiteGraph implementation
Joris Mooij [Mon, 8 Sep 2008 14:14:10 +0000 (16:14 +0200)]
Pervasive change of BipartiteGraph implementation

- Added conditional compilation of inference methods
- New implementation of BipartiteGraph: it does not store the
node properties anymore, and nor does it store an adjacency
matrix. Instead, it stores lists of neighbors. An easy way
of iterating over neighbors is to use boost::foreach.
- Interface changes in FactorGraph:
  * delta(const Var &) -> delta(size_t)
  * Delta(const Var &) -> Delta(size_t)
  * makeCavity(const Var &) -> makeCavity(size_t)
  * removed MakeFactorCavity(size_t)
  * removed ExactMarginal(const VarSet &)
  * removed ExactlogZ()
  * removed isConnected() (moved to BipartiteGraph)
  * vars() -> vars
  * factors() -> factors
- Interface changes in RegionGraph:
  * nr_ORs() -> nrORs()
  * nr_IRs() -> nrIRs()
  * ORs() -> ORs
  * IRs() -> IRs
- Fixed typo in utils/fg2dot.cpp

11 years agoFixed little bug in fg2dot.cpp
Joris Mooij [Fri, 5 Sep 2008 15:25:33 +0000 (17:25 +0200)]
Fixed little bug in fg2dot.cpp

11 years ago* Contributions by Giuseppe Passino in dai::TProb.
Joris Mooij [Wed, 3 Sep 2008 15:49:42 +0000 (17:49 +0200)]
* Contributions by Giuseppe Passino in dai::TProb.

- removed copy constructor and assignment operators (redundant)
- implementation of some methods via STL algorithms
- added methods takeExp, takeLog, takeLog0 for transformation in-place
- explicit constructor (prevents implicit conversion from size_t to TProb)
- added operator+,+=,-,-=, with argument T (for calculations in log-scale)

11 years agoMisc small changes:
Joris Mooij [Wed, 3 Sep 2008 13:25:26 +0000 (15:25 +0200)]
Misc small changes:

* Renamed DEBUG to DAI_DEBUG to avoid conflicts
* Renamed variable _N in mr.* for compatibility with g++ under cygwin

11 years agoPartial adoption of contributions by Giuseppe:
Joris Mooij [Mon, 25 Aug 2008 21:03:30 +0000 (23:03 +0200)]
Partial adoption of contributions by Giuseppe:
* removed "using namespace std;" from header files - bad practice
* moved header files in include/dai and sources in src
* changed #ifndefs in headers to GNU style
* added extra warning checks (-W -Wextra) and fixed resulting warnings

11 years agoAdopted contributions by Christian.
Joris Mooij [Mon, 25 Aug 2008 09:25:48 +0000 (11:25 +0200)]
Adopted contributions by Christian.
* Contributions by Christian, resulting in vast speed and memory improvements
  for large factor graphs:
  - Sparse implementation of nodes->edge conversion table _E12ind in bipgraph.h
  - New FactorGraph constructor that constructs from given ranges of factors
    and variables
  - Optimization of FactorGraph constructors
* FactorGraph constructors no longer check for short loops and for
  negative entries. Also, the normtype is now Prob::NORMPROB by default.
* Moved everything into namespace "dai"

11 years agoInitial commit of libDAI-0.2.1
Joris Mooij [Sat, 23 Aug 2008 10:52:23 +0000 (12:52 +0200)]
Initial commit of libDAI-0.2.1

11 years agoThird test commit.
Joris Mooij [Wed, 20 Aug 2008 12:32:40 +0000 (14:32 +0200)]
Third test commit.

11 years agoSecond test commit
Joris Mooij [Wed, 20 Aug 2008 10:53:25 +0000 (12:53 +0200)]
Second test commit

12 years agoInitial commit (just a test)
Joris Mooij [Mon, 19 May 2008 09:26:58 +0000 (11:26 +0200)]
Initial commit (just a test)