Zum Inhalt springen

Staz: light-weight, high-performance statistical library in C

Hello everyone!

I wanted to show you my project that I’ve been working on for a while: Staz, a super lightweight and fast C library for statistical calculations. The idea was born because I often needed basic statistical functions in my C projects, but I didn’t want to carry heavy dependencies or complicated libraries.

Staz is completely contained in a single header file – just do #include "staz.h" and you’re ready to go. Zero external dependencies, works with both C and C++, and is designed to be as fast as possible.

What it can do: – Means of all types (arithmetic, geometric, harmonic, quadratic) – Median, mode, quantiles – Standard deviation and other variants – Correlation and linear regression – Boxplot data – Custom error handling

Quick example: „`c double data[] = {1.2, 3.4, 2.1, 4.5, 2.8, 3.9, 1.7}; size_t len ​​= 7;

double mean = staz_mean(ARITHMETICAL, data, len); double stddev = staz_deviation(D_STANDARD, data, len); double correlation = staz_correlation(x_data, y_data, len); „`

I designed it with portability, performance and simplicity in mind. All documentation is inline and every function handles errors consistently.

It’s still a work in progress, but I’m quite happy with how it’s coming out. If you want, check it out 🙂

submitted by /u/ANDRVV_
[link] [comments]

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert