The Netica-C API is a complete library of C-callable functions for working
with Bayesian belief networks
and influence diagrams. It contains
functions to build, modify, and learn networks, as well as a powerful
inference engine. It may be embedded in programs written in any language
(such as C++), as long as the language can call C functions.
The Netica-C API is one member of the family of Netica APIs, including ones for Java, C++, and Visual Basic.
This list outlines features specific to the C API. For the features shared by all the Netica APIs, please see the Netica API page.
- Ultra fast. Designed for speed and compiled with maximum speed optimization.
- Great Documentation. Well written and easy to understand user's manual, and a comprehensive, detailed, and well cross-indexed function reference.
- Very low calling overhead.
- Small memory footprint. The library is relatively small, between 300K to 4MB depending on platform/usage, with 1MB being typical.
- Is a C language interface. Usable by programs written in C, or any language that can call C functions (e.g., C++, Java, Python, Delphi, Pascal, Lisp, Fortran, Cobol).
- High code-portability. The C API uses the standard C calling convention, and the only library it requires is the C Standard Library. As a result, we are able to compile it on dozens of platforms. This means that if you need Netica for an embedded device or other platform, we should be able to build a version for you.
- Sample code. Sample applications to get you started and many functions provided in source code form for easy customization (NeticaEx.c).
- Strict user/API memory management independence. Netica will never free any array, string or structure you pass it, that was not originally created by Netica. In other words, you are responsible for freeing the things you create, and Netica has functions for freeing the things it creates.
- Namespace safe. All global symbols end in "_ns" or "_bn" to prevent namespace conflicts.
- Object encapsulation. Only function calls and constants (as enumerated types) are exposed, no structures or variables.
- Memory allocation safety. Netica functions are designed to fail gracefully when system memory is depleted. Netica keeps some memory in reserve to allow simple operations to complete successfully, even if memory limits are reached. Finally, warning signals are generated when memory gets low.
- Virtual memory thrash prevention. You can set a bound on how much total heap space Netica API is allowed to allocate, thereby preventing virtual memory thrashing or the memory-starving of other parts of your application.
- Thread safe. Netica will operate safely in a multi-threaded environment.
- User-data friendly. Every node and network has "user-settable/readable" fields which
can point to anything you wish.
- Forward compatibility. The Netica API is "forward compatible" in that you
should never need to revise your code. Even as API methods are enhanced,
a "compaitibility section" of the Netica API header file,
Netica.h, ensures that old function prototypes will continue to work.
These sample programs show how easy it is to develop with the Netica-C API:
||Constructs a simple net for doing medical diagnosis, then saves it to file.|
||Does inference on the medical diagnosis net just constructed.|
||Creates a case file that matches the statistics of the above net.|
||Learns the CPTs of a Bayes net from a file of cases.|
||Constructs a simple net to decide whether or not to take an umbrella based on the weather forecast.|
- Please see the parent page: Netica API Family regarding pricing.
- The purchase of a Netica API license allows you to use all members of the Netica API Family with equal rights and obligations.
- Free Version: You can download Netica-C API (below) and use it for free. The free version operates as a full-feature version but is limited in model size.
32 and 64 bit versions included
||DLL file (usable with many development
environments such as Visual C++, Visual Basic, Delphi, Borland C++ Builder, etc.)
32 and 64 bit versions included
||.a file, compiled with gcc 4.4.6(32bit) and 4.5.2(64bit)
Tested on Ubuntu 11.0 and Centos 6.2
|Mac OSX 10.7 and 10.8 x86
||.a file, compiled with Apple's gcc-4.2.1
|Apple's iOS (iPhone/iPad/iPod)
||.a files, for ARMv6, ARMv7, and simulators; for iOS 5.0 and higher
Android - ARM
||Built with android-ndk-r8b on 64-bit Ubuntu Linux (11.04) with kernel 2.6.38-8
Versions for other platforms and older versions of the above software and documentation sets are available here.
Version numbers explained: The method for assigning version numbers to Norsys products is explained here
- Unzip the downloaded file (unzip <filename>.zip).
- Read the README.TXT file or Install.doc, and follow any further instructions it may contain.
- To mail us with questions or comments regarding Netica-C API, click here.
- To be added to our mailing list and be notified of new releases and other news about Netica and Netica-C API (mailings are infrequent), click here.