## Best stats library for C (not C++)

gsl (http://www.gnu.org/software/gsl/) is widely available, portable, and has a lot of nice functionality.

## c library for computing mean, median, mode, other statistics?

GNU Scientific Library (GSL) provides the functionality. Apophenia mentioned by another appears to provide a layer on top of GSL. Something to bear in mind with GSL is that it is frequently a slow implementation of many functions. For instance, its mean calculations perform division inside the loop to ensure best possible precision of the result. In many applications this cost is not worth the precision.

## Statistic Library for Objective C

Check out C/C++ libraries: wikipedia list, SO question.

## What is a good statistical math package for .Net?

MathDotNet should have the functions you are looking for, although it may be a bit of overkill depending on how much functionality you need.

It offers:

- Bernoulli
- Beta
- Binomial
- Categorical
- Cauchy
- Chi
- Chi Square
- Continuous Uniform
- Conway Maxwell Poisson
- Dirichlet
- Discrete Uniform
- Erlang
- Exponential
- etc.... (about 3x more on the list)

For a complete list see this page.

## Recommend an Open Source .NET Statistics Library

I found this on the CodeProject website. It looks like a good C# class for handling most of the basic statistical functions.

- http://www.codeproject.com/KB/cs/csstatistics.aspx

## Any C++ data mining library which also have the support of mysql?

Use this source to find a suitable ML C++ library:

- mloss.org filtered by C++

Some recommended ML libraries for C++ :

- Shark
- Shogun
- libSVM
- DLIB
- Waffles
- LIBLINEAR
- GibbsLDA++

See this related question.

## C probability library similar to R

You can always embed R itself in your C application. That is doable, and documented, but a tad tedious as the API is pretty bare.

If you are open to C++, it gets much easier thanks to RInside. If you can do this in R:

`R> set.seed(123); sample(LETTERS[1:5], 10, replace=TRUE)`

[1] "B" "D" "C" "E" "E" "A" "C" "E" "C" "C"

R>

you can do the same in C++ pretty easily thanks to RInside:

`edd@max:~/svn/rinside/pkg/inst/examples/standard$ cat rinside_sample12.cpp`

// Simple example motivated by StackOverflow question on using sample() from C

//

// Copyright (C) 2012 Dirk Eddelbuettel and Romain Francois

#include <RInside.h> // for the embedded R via RInside

int main(int argc, char *argv[]) {

RInside R(argc, argv); // create an embedded R instance

std::string cmd = "set.seed(123); sample(LETTERS[1:5], 10, replace=TRUE)";

Rcpp::CharacterVector res = R.parseEval(cmd); // parse, eval + return result

for (int i=0; i<res.size(); i++) {

std::cout << res[i] << " ";

}

std::cout << std::endl;

exit(0);

}

edd@max:~/svn/rinside/pkg/inst/examples/standard$

and given that it runs the *same code with the same RNG seed* it also returns the same result:

`edd@max:~/svn/rinside/pkg/inst/examples/standard$ ./rinside_sample12`

B D C E E A C E C C

edd@max:~/svn/rinside/pkg/inst/examples/standard$

If you just drop the code I showed above into the directory `examples/standard`

of an existing RInside installation and say `make`

, the executable will be made and given the same basename as your source file (here `rinside_sample12`

from `rinside_sample12.cpp`

).

## How to use C libraries in Vlang for basic statistics

Yes, you can call C libraries from V.

You need to make the C library's structs, typedefs and functions known to V by defining them in V first - before calling/using them.

For structs you conveniently only need to define the fields you need to use.

Here's some examples:

- via 2D game framework wrapping several C libs
- sokol in vlib
- v-miniaudio wrapper (disclaimer: my own module)

Generally you can find a lot of C wrapper code in vlib itself. (We're working on replacing C with pure V)

### Related Topics

Explicit Return Type of Lambda

What Is Monomorphisation with Context to C++

Can Branches with Undefined Behavior Be Assumed Unreachable and Optimized as Dead Code

Fastest Way to Get the Integer Part of Sqrt(N)

Implicit VS Explicit Conversion

Current Date and Time as String

Enum VS Constexpr for Actual Static Constants Inside Classes

Does the Restrict Keyword Provide Significant Benefits in Gcc/G++

Why Sizeof Int Is Wrong, While Sizeof(Int) Is Right

How to Pass Multiple Ints into a Vector at Once

Why Doesn't This Reinterpret_Cast Compile

Are There Binary Memory Streams in C++

Visual Studio 2010 & 2008 Can't Handle Source Files with Identical Names in Different Folders