IntroductionΒΆ

The turing_bbn project is divided into four namespaces.

  • com::ooc::bbn::graph contains all the classes for graph-related items

  • com::ooc::bbn::pptc contains all the class related to exact inference

  • com::ooc::bbn::sampling contains all the classes related to sampling

  • com::ooc::bbn::util contains 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 Node class wrapped in a shared pointer std::shared_ptr<Node> and aliased as _node.

Additionally, it is discouraged to instantiate objects and pointers directly (using the constructor or new). 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 instance methods.

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.