...
These functions are the main entry point from user input and are largely responsible for the flow control of the algorithms. Generally, the implementation consists of validating input parameters, executing SQL statements, evaluating the results and potentially looping to execute more SQL statements until some convergence criteria has been hit.
2. C++ Implementation Functions
Mostly located under https://github.com/apache/incubator-madlib/tree/master/src/modules
These functions are the C++ definitions of the core functions and aggregates needed for particular algorithms. These are implemented in C++ rather than Python for performance reasons.
3. C++ database abstraction layer
Mostly located under https://github.com/apache/incubator-madlib/tree/master/src/dbal
...