Hi all,
Since graph theory is becoming increasingly important in the preprocessor, Ferhat and myself have agreed on reusing a standard library for graph manipulation.
A good choice seems to be the Boost Graph Library: http://www.boost.org/doc/libs/1_38_0/libs/graph/doc/index.html
It is written as C++ generic headers, and is distributed under a BSD-style license (i.e. very permissive), compatible with the GPL.
It contains various reusable structures for storing graphs (as adjacency list, adjacency matrix) and various algorithms (in particular strongly connected components).
The whole set of Boost libraries is distributed as Debian and Cygwin packages.
This leads me to another point: if we use the BGL (boost graph library), the build system of the preprocessor needs to know where the BGL headers are. Under Debian it is /usr/include, under Cygwin /usr/include/boost-1_33_1/, and it may be somewhere else for other systems (MacOS for example).
So I think that we should now have a "configure" script at the top level of the Dynare directory, which would autodetect the location of the BGL, and other stuff (such as those that are currently tested for in the preprocessor Makefile). This "configure" script could also be extended to facilitate the building of MEX files from the command line (as it seems to be necessary for k-order perturbation DLL). It could even enable us to replace the build_matlab.m script by a Makefile. With a single "make" at the top-level, we could build the preprocessor, the documentation and the MEX files.
The only drawback of adding this is that our build system will be tightly linked to Cygwin for Windows users, but I think that many people that recompile things on Windows already use Cygwin.
Any thoughts or suggestions on the Boost Graph Library and the "configure" script ?
Best,