Best library for statistics in C++? [closed] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm looking for high performance code (needs to run in real-time), preferably open source, but if there is nothing that's free and high-perf, I'll take something well supported and of high quality for a cost.
Any suggestions?
These are the ones I've found so far, in no particular order:
CodeCogs
GSL
Cephes
Boost MathToolkit
Blitz++
TNT

Check the links on mathtools.net. The page for statistics libraries for C++ has links. Another page http://www.thefreecountry.com/sourcecode/mathematics.shtml lists few more.
Have you checked the 'R project'? I think you can call 'R objects' from C/C++.

I'm surprised nobody's mentioned ALGLIB: http://www.alglib.net/

Root has pretty good statistical support. At least as us particle physics types judge these thing. Works in cint interpretation or as a native c++ library.

TNT is for matrix calculations but doesn't have any statistics functionality. (e.g. erf, mean/std/cov etc)
I haven't used Boost Math Toolkit, but skimming through the documentation, it looks like it has the opposite problem, e.g. lots of goodies for scalar calculations, but no support (that I could find) for multivariate situations.

I have used the IT++ library in the past, this library supports ACML and MKL routines trough BLAS and LAPACK. If it are calculations that need to happen fast, there is the possibility of using this library together with HPC, this is an although undocumented feature so some thought will be required.
The focus on this library is however positioned on matrix calculations, but many normal mathematic and statistic functions can be found in this framework thanks to its excellent signal processing support.

Related

Is there a fast and free alternative to MATLAB regarding matrix calculations? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I am looking for a fast and free alternative to MATLAB regarding matrix calculations (inversions, etc).
MATLAB is fast but also expensive.
Besides, as it is an interpreted language, I think there must be libraries for compiled languages which can achieve the same matrix operations faster.
I know Octave but I have heard it is slower than MATLAB...
Does anyone know of something?
Since you tagged your question with C++, I suggest Eigen.
I think that python with some library like SciPy and NumPy can be a good solution. (Python is not a strictly compiled language, but most of the libraries are written in C/C++ and are pretty fast).
I personally use the unofficial OpenGL Math Library GLM. It should have everything you should need.
http://glm.g-truc.net/0.9.5/index.html

finding static scheduling of DAG for multiprocessors - library? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I have a graph of the dependencies of all tasks, and the costs of each task. Now I want to calculate a scheduling for a given amount of CPUs. I've found many papers on scheduling algorithms, optimal schedulers seem to be too expensive for my problem size (around 100 nodes) as it's an NP-hard problem. I'd settle for a heuristic, preferably one that has a bound how close it gets to the optimum. My problem now is: do I really have to code it myself?? This should have been solved many times before, it can be easily applied to project management, maybe there something exists?
If you happen to know a library in python that'd be perfect or the next best thing would be C++, otherwise i'd settle for anything else.
This is a pretty common problem. It also shows up in hardware design.
There has been a lot of work on algorithms to solve it.
If you are going to write something yourself, start by checking out "Hu's Algorithm".
If you just want a solution, these functions are built into architectural synthesis programs.
Look at the Wikipedia pages on high level synthesis and logic synthesis.
There are several professional tools that can handle this, if you can get access to them through school or work.
There are university programs you can often get for free that can also handle this problem.
I'm not up-to-date on what is currently available. An very old one is MIS II from Berkeley. It's scripting language was Tcl, not Python.

Is there any FOSS tool to reliably create a UML model from existing c++ code? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I have tried Umbrello and ArgoUML; and both are unable to generate code from an existing c++ codebase. Though they have limited capabilities in these areas, they both fail spectacularly importing a file with std, boost, SDL and local includes. Is there anything in the FOSS world that will model reasonably complex c++ code. The UML part is optional, generating coherent and accurate visualizations of the code is what matters.
Note: Tools like gprof2dot as well as doxygen can process the source, but their output is so complex as to be equivalently difficult to grasp as the original code.
Note2: Since one cannot ask about tools on SO anymore, let me rephrase the question like this:
How, given a large, old, complex and crufty c++ code base, can one quickly and efficiently perform major refactorings. By major, I mean things like:
extracting entire structs/enums/classes from an existing source/header pair into their own files
adding/deleting namespaces
changing function signatures
etc.
Some things are approachable with grep and sed; however, discovering and managing include dependencies can be overwhelming. I'm currently stuck with the "change-and-fix" method -- try refactoring something and iteratively build and fix errors as the compiler point them out. For widely used objects, this is slow. What is the proper approach?
I used Doxygen for this on a couple of projects.
It wasn't great but it was better than starting from scratch.
This paper from 2005 describes the pilfer tool, which is now included within the srctools project. It's available under a GNU General Public License.

sparse non-negative least squares in C++ [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I'm looking for a software package to solve a very large, sparse non-linear least squares problem in C++. I've come across a large number of modern linalg libraries in C++ (eigen, armadillo, boost, etc.), but none seem to have such a solver (or even a regular least-squares solver) built in. I'd really like to avoid a bunch of messy calls to an old C / Fortran interface if possible. Thanks!
I would simply use the general-purpose NLP solver IPOPT written in C++. It is the most robust solver among those I have tried and it is meant and successfully used on very large problems.
A change in requirements (e.g. adding constraints) would be no problem if you use the general-purpose IPOPT.
The time consuming part of the solution procedure is to solve the linear systems in each iteration step so it's worth getting the best linear solver + LinAlg package for your platform.
Unfortunately IPOPT calls Fortran subroutines internally so you will need a Fortran compiler which is sort of a pain.
If IPOPT is not enough, you will have to look for a problem specific solver.
If you don't need constraints, try out Ceres or g2o. Both build on top of Eigen and can utilize sparse matrix solvers, i.e. SuiteSparse and friends.

Geometry library in C++ [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I am looking for an easy to use and well documented geometry library in c++. I would like to use it in 3D perception that I am dealing with point clouds. Coordinate transformations, rotations and translations are my special concern now. Any suggestion?
A very powerful library is cgal. Some of the functions in opengl may also be of use.
Check out Boost::Geometry
It has some basic point definitions and coordinate systems as well as distance calculations. From there you can extend it as needed.
There's also some intersection routines and things to find convex hulls from clouds of points.
Check out this site. It gives you a very good overview about existing geometry libraries, even with some pros and cons.
Update:
And you may also have a look at the Point Cloud Library. It's quite a new library for working with point clouds, easy to understand and has plenty of good tutorials to get started with!
PLIB: A Suite of Portable Game Libraries
Note: Just because it says "game" it doesnt mean you cant use it in anything other than developing games.
If you're going to render your geometries in a VGA screen, I strongly recommend you to use microsoft DirectX library which is the best one for graphics rendering. Otherwise, just go with Boost::Geometry library which would be enough for your purpose.