SNHA algorithm implemented in various programming languages.
Already existing are implementations in:
- Groth, D.; Scheffler, C.; Hermanussen, M. (2019): Body height in stunted Indonesian children depends directly on parental education and not via a nutrition mediated pathway - Evidence from tracing association chains by St. Nicolas House Analysis. In Anthropologischer Anzeiger. DOI: 10.1127/anthranz/2019/1027
- Hermanussen, M., Aßmann, C., & Groth, D. (2021). Chain reversion for detecting associations in interacting variables—St. Nicolas House Analysis. International journal of environmental research and public health, 18(4), 1741. DOI: 10.3390/ijerph18041741
We will use the check following language transpilers to create code for several programming languages from one code base:
- Fusion - Fusion programming language, it should create code for C, Cpp, C#, D, Java, Javascript, Python, Swift, TypeScript and OpenCL C
- Haxe - Haxe programming language it should create code for C++, C-sharp, the Haxe interpreter, Java, Lua, Python and Neko
- Temper - Temper programming language transpiles to C-Sharp, Java, Javascript, TypeScript, Lua, Python and Rust (C++)
- Py2many - using the Python programming language it should create code for C, C++, D, Dart, Go, Julia, Kotlin, Nim, Rust and V - where C++ and Rust are currently considered production ready, however not ready to be used yet
- Nim - Nim programming language compiles to C, C++ and Javascript, C code seems hard to use
- V - V programming language compiles to C and can import C
- Dafny - Dafny programming language compiles to C#, Go, Python, Java or Javascript
Further the following direct implementations in other programming languages which seems not to have a high level programming language transpiler will be placed here:
Using generated C code, for instance create by Fusion, we might then use the Swig interface generator to add support for more languages, here an example for that workflow:
The following features will be implemented:
- Data structures:
- Data frame with row and colnames features.
- Matrix with rownames and colnames features.
- Graph structure with degree and harmonic centrality measures.
- Reading data from CSV files into data frames.
- Graph and data generation:
- Graph generation for regular, random and explicit graph types.
- Generate data with a normal distribution.
- Data generation for graphs using Monte Carlo simulation.
- Command line support for generating graphs and data.
- Generating of GraphViz code for creating plots.
- Graph prediction:
- SNHA algorithm implementation.
- Quality measures for graph prediction if the real structure is known.
- Command line support for data reading and prediction
Here is the process diagram:
| Language | Compiler / Interpreter | Rand.fu | Stats.fu | Matrix.fu | Mgraph.fu | Mcgraph.fu |
|---|---|---|---|---|---|---|
| C | gcc 14-15 | [x] | [x] | [x] | [x] | [x] |
| C++ | g++ 14-15 | [x] | [x] | [x] | [x] | [x] |
| C# | dotnet 10 | [x] | [x] | [x] | [x] | [x] |
| D | ldc2 1.40 / dmd 2.112 | [x] | [x] | [x] | [x] | [x] |
| Java | javac 21-25 | [x] | [x] | [x] | [x] | [x] |
| JavaScript | node 20-22 | [x] | [x] | [x] | [x] | [x] |
| Python | python 3.13 | [x] | [x] | [x] | [x] | [x] |
| Swift | swift 6.0-6.3 | [x] | [x] | [x] | [x] | [x] |
| TypeScript | bun 1.3 | [x] | [x] | [x] | [x] | [x] |
| Language | FileSystem.fu | CSVParser.fu | SNHA.fu | Timeit.fu | ListUtils.fu |
|---|---|---|---|---|---|
| C | [x] | [x] | [x] | [x] | [x] |
| C++ | [x] | [x] | [x] | [x] | [x] |
| C# | [x] | [x] | [x] | [x] | [x] |
| D | [x] | [x] | [x] | [x] | [x] |
| Java | [x] | [x] | [x] | [x] | [x] |
| JavaScript | [x] | [x] | [x] | [x] | [x] |
| Python | [x] | [x] | [x] | [x] | [x] |
| Swift | [x] | [x] | [x] | [x] | [x] |
| TypeScript | [x] | [x] | [x] | [x] | [x] |
The following persons contribute to the project:
- Alba de Prada Hernandez (AP), University of Potsdam (graph and data generation modules)
- Christopher Olvera (CO), University of Potsdam (implementation of SNHA algorithm and accuracy metrics)
- Detlef Groth (DG), University of Potsdam (supervisor and random data generation)
- Harshini Praveen Kumar (HP), University of Potsdam (statistics module)
- Roberto Zarazua (RZ), University of Potsdam (Julia code, used for implementation)