advance mathematics c++ libraries [closed] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
what popular advance mathematics libraries for c++ are present out there, so that they can be used as a 1 stop solution and avoiding reinventing the wheel ?

Check out GNU Scientific Library -- it's in C, but I use it all the time to avoid re-writing the Numerical Recipes code.

Intel's MKL (Math Kernel Library) is to be looked at especially if doing large scale matrix operations; it's C based, but should not really be an issue IMO.
Other than that, maybe the boost math library could be interesting as it is free. (but I have no experience with it, so YMMV).
Max.

Like others have said, you will probably not find a single library to handle all of the areas you listed. For matrix algebra, I've heard good things about the Eigen C++ library from coworkers who are using it.

For commercial libraries, both NAG (Numerical Algorithms Group, http://www.nag.co.uk/) and IMSL ( http://www.vni.com/products/imsl/ ) are standards and provide industrial-strength numerical analysis algorithms.

look through the list and mix-and-match. You want very many things, unlikely any single package is going to do them all.
http://www.oonumerics.org/
octave is the only one that is going to be more or less comprehensive (functionality comparable/clone to Matlab)
http://www.mathias-michel.de/download/howto-octave-c++.ps

For group theory there is GAP.

Related

GPU programming on Clojure? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I'm wondering what if any GPU integration libraries exist for Clojure?
I've seen examples of this that involve hand-rolling OpenCL code, but I'm specifically I'm looking for something similar to Anacoda accelerate, which translates Numpy Python expressions to CUDA code relatively seamlessly.
I'm open to either OpenCL or Cuda approaches.
here is a project that recently started on github https://github.com/JulesGosnell/clumatra. Its seems more like an experiment and its quite impressive!
There is a Google Summer of Code project proposal to add a GPU matrix implementation to core.matrix:
http://dev.clojure.org/display/community/Project+Ideas
Once completed, this project would allow large vector/matrix expressions to be optimised and executed on GPUs.
Disclaimer: I'm a possible mentor for this project.
clojureCL was released a few months after this question was posted. It looks like it offers a more idiomatic interpretation of the standard interface, but it is not a tool that would transform Clojure math / vector operations into OpenCL operations (I think that that is what the OP is looking for?)
[ClojureCL] brings a lot of power, but do not expect it to be an easy ride if you’ve never programmed anything on the GPU or embedded devices. With ClojureCL, it is not [as] difficult as in C (OpenCL Hello World in C is a hundred lines of source code, in ClojureCL it’s only a few), ...
The good news is that you can use any OpenCL book to learn ClojureCL, and we even provide ClojureCL code for the examples used in the OpenCL in Action book.
An old topic but now we have clojurecuda, which is a wrapper on JCuda!
It won't give you automagic speedup on things but at least Neanderthal is a higher level library for linear algebra.

Library for Trust-Region Reflective algorithms in C [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I'm trying to rebuild some Matlab code in C that uses their fsolve function. From the documentation it's using a "trust region reflective" algorithm (I already built it using a Levenberg-marquardt algorithm and it's converging completely differently). Can anyone recommend a library for doing this type of optimization in C/C++ ?
Not sure what "reflective" adds to the "trust region" definition. However, Knitro is a powerful trust-region interior-point optimizer with a C/C++ interface. Unfortunately, Knitro is only available without cost in a limited edition for students; the full version requires a commercial license.
There is also Ipopt, which is not trust-region but nevertheless a powerful C/C++ based large-scale nonlinear constrained optimization engine with an open-source license.
Have you tried checking if your function is convex, if LM and some other convex optimization algorithm converge differently, there is a good chance that the base function is not convex. Also have you checked if the cost function is at least of order 2. If this is the case minimizing the square of the cost function can be better than minimizing the cost function alone.
There are two types of general-purpose algorithms for which there is a global convergence guarantee (under standard assumptions, don't ask :) ). These methods are the line search and the trust region methods. If you wish, you can read more on this topic in the book of Nocedal-Wright: Numerical Optimization.
I haven't tried Knitro recently.
Ipopt is the most robust solver among those I have tried, I highly recommend it. It implements the line search method and is written in C++.

Looking for a C++ open source matrix storage library [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
The library needs to:
record vector or matrices in "frames" (timestamped)
enable multiple streams and markers
It would be good if the library:
had a BSD licence
was well documented
was written in C++
enabled non-linear access
I have found a library that is very interesting and does points (1) and (2): SDIF. But the documentation is lacking and the license is LGPL.
Any recommendations ?
What about boost ublas?
The boost license that ublas uses looks pretty liberal but IANAL.
I stumbled across Armadillo. It is LGPL. Well documented though.
As I have just suggested, Eigen is the way a matrix library in C++ should be.
Eigen is definitely the best matrix library in C++ at the moment.
http://eigen.tuxfamily.org/index.php?title=Main_Page
I warmly suggest you.
For example this code creates a random 10x10 matrix and compute its inverse:
MatrixXd A(10,10);
A.setRandom(10,10);
MatrixXd B = A.inverse();
you can have access to all numerical matrix algebra things, such as decompositions, linear system solving and other geometry algorithms.
It's only headers, no external dependency, no installation. It works for a large range of compilers and is very well mantained and documented.

What's a good convex optimization library? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I am looking for a C++ library, and I am dealing with convex objective and constraint functions.
I am guessing your problem is non-linear. Where i work, we use SNOPT, Ipopt and another proprietary solver (not for sale). We have also tried and heard good things about Knitro.
As long as your problem is convex, all these solvers work well.
They all have their own API, but they all ask for the same information : values, first and second derivatives.
Assuming your problems are nonlinear, you can use free and open-sourced OPT++, available from Sandia Lab. I have used it in one project in C++ and it was easy to use and worked well.
From what I know, the CPLEX solver is the best convex optimization solver. Its the state of the art in LP solvers. Does convex optimization really well. While looking for it, I see that its IBM's software now. You can find it here : http://www-01.ibm.com/software/integration/optimization/cplex/

C++ 2D Integration Libraries [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Can anyone point out a good C++ library that can do 2D numerical integration. It needs to be able to accept a 2D array of known values, and the spacing between the points can be assumed to be constant (for a start).
It is preferable that it have a license which allows modifying the code as needed.
It's actually a C library, but if the GPL licensing terms work for you try:
http://www.gnu.org/software/gsl/
You will want to check out the Monte Carlo integration options outlined here:
http://www.gnu.org/software/gsl/manual/html_node/Monte-Carlo-Integration.html
This Fortran library is easy to link to from C++ and is in public domain:
http://gams.nist.gov/cgi-bin/serve.cgi/Module/CMLIB/ADAPT/2967
It's single precision but it's quite easy to modify the sources (get "full sources" and go through every function) to switch to double precision.
http://itpp.sourceforge.net/current/
Try this. It can do what you ask for and more! And you can modify the code as much as you like.
I've read somewhere that you can extract libraries out of GNU Octave's code and use the C++ code in your own applications. I'm not sure if that's an easy task, but you can give it a try if you have the time.