To install the library just move the
include folder into a proper place,
/usr/local/include in Unix-alike systems. Alternatively, one can use
CMake (2.8 or later required),
cd /path_to_vSMC_source mkdir build cd build cmake .. sudo make install
To make the documentations one need Doxygen 1.8.1 or later.
The documentation can also be found here.
In addition, the library use the
headers, which are parts of the C++11 standard libraries or can be found in
Boost. By default the library will use the Boost library. But
if the C++ implementation has them correctly implemented, the standard headers
can also be used.
Note that this library is only tested with Boost 1.49 or later. Also
not all C++11 (or C++0x) implementations of
<type_traits> work properly.
Building and testing
To build test examples,
To run the tests,
Note that CMake generated
Makefile does not build test executables
ctest in the
test target, so you need run
make test or
make buildtests will also build the examples, one is a simple particle
test/pf, the others are a Gaussian mixture model and Positron
Emission Tomography compartmental model with SMC, in
respectively. The examples may take some non-trivial run-time, therefore they
are not run when invoking
make test or
ctest. To run the example, one can
ctest -C Release. Alternatively, one can use
to build all tests and examples, and run all of them.
Without CMake one can go to the
test directory and build the
examples manually. For example,
cd test/pf g++ -std=c++0x -O3 \ -I /path_to_v_smc_headers \ -I /path_to_eigen_headers \ -I /path_to_random123_headers \ -I /path_to_tbb_headers -L /path_to_tbb_libraries -ltbb \ -o pf_tbb pf_tbb.cpp
There are some other more complex realistic examples and other configurations for the simple particle filter. They may require additional optional libraries.
The library itself only use standard C++98 features and is fairly portable.
For compiler support of Eigen and Random123 see their
pages respectively. In C++11 mode, the usability of
<type_traits> headers distributed with various implementations differs
significantly. However Boost can be used as a replacement and which is
well known for portability.
- GCC 4.4, 4.5, 4.6,
- Intel icpc 12.0, 12.1
- Clang 2.8, 2.9, 3.0, 3.1, SVN
Mac OS X
- Clang 3.1
- Intel icpc 12.1
- MSVC 2010
The vSMC library is distributed with a two-clauses BSD license which can be found in the COPYING file distributed with the source.