>
Netica-C Programmers' Module (C API)

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.

C API Features

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.

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.

Sample Code

These sample programs show how easy it is to develop with the Netica-C API:

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

Installation Instructions

Unzip the downloaded file (unzip <filename>.zip).

Read the README.TXT file or Install.doc, and follow any further instructions it may contain.

Enquiries & Notices

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.