turing_bbn project is divided into four namespaces.
com::ooc::bbn::graphcontains all the classes for graph-related items
com::ooc::bbn::pptccontains all the class related to exact inference
com::ooc::bbn::samplingcontains all the classes related to sampling
com::ooc::bbn::utilcontains utility classes
Note that there are aliases for nearly all classes as we are wrapping the classes up with
shared pointers or
std::shared_ptr. This approach is to reduce the chances of memory leaks. These aliases are typically
named starting with an underscore
_ and then camel casing of the class name. For example, the
class wrapped in a shared pointer
std::shared_ptr<Node> and aliased as
Additionally, it is discouraged to instantiate objects and pointers directly (using the constructor or
Instead, each class has overloaded factory methods called
instance where you may pass in constructor
arguments to create a shared pointer version of the object/instance. Take a look at the unit test code to
see how to use these
We aim for minimal dependencies to external libraries as we are porting the code across different languages.
In this project, the only external dependency is to the
boost library for unit testing. Some features
available in other ports of the code (e.g. serialization to JSON) are not available here as that would require
an external library to ease the pain of development.