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
Is there an implementation callable from C or C++ that allows the evaluation of the generalized hypergeometric function pFq(a1,...,ap; b1,...,bp; x)?
I tried GSL and Boost, but I don't think the generalized function is available in either of those libraries.
I believe the Arb library, a C library for arbitrary-precision floating-point ball arithmetic developed by the creator of mpmath, now provides an implementation.
I would suggest using this python library for the functions you need. It seems like it has it.
The trick however is you need to be able to call a python script from C++. For that you can use a boost component.
This seems like the easiest solution, even if it is possibly inefficient.
Related
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 2 years ago.
Improve this question
I can't search what does the logarithm code look like in C++? What the code of the logarithm function looks like in C++ in the library cmath? Exactly the code. I don't need to figure out how I can get the logarithm. I want to know how this algorithm works.
You would be very disappointed. On modern processors, the C++ compiler inserts the assembly instruction that obtains it from the floating-point ALU. There is no code.
That is implementation specific and therefore can vary from system to system.
Since there are several ways to compute a logarithm, a good book on this kind of algorithm is a good start.
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
How might one implement data frame in R, Python, and other languages using C++?
In general, data.frame solves a problem which is solved fundamentally differently in C++ (and other languages) – namely via class hierarchies, or, in the simplest case, via a vector of tuples.
Since you haven’t given specifics it’s hard to know what exactly you are after but if it’s ease of computation, Armadillo is a good linear algebra library for C++ (one among many). I haven’t yet found a good statistics framework for C++ – I suggest simply sticking with R for that.
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
I cannot use gsl_matrix because my app is closed source and, according to this question, if I used GPL code directly, I'd have to make my app open source. And that's a no-no from the higher ups.
So... Does Boost, or even better, TR1, have a library with classes equivalent to gsl_matrix, gsl_vector and other types from the GNU Scientific Library? If there are such classes, how are they called?
Edit: I need to:
Perform dense matrix-vector products and sums (like gsl_blas_dgemv and gsl_blas_dgemm do)
Optionally, solve quadratic programming models.
First of all, there is C interface for BLAS/LAPACK. Some people find it 'hard' to deal with the call signatures which directly mirror the original BLAS ones.
If you're more into fancier side of things, there's Boost uBLAS interface, there's Armadillo, to name just two. Performance-wise, your mileage may vary.
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 6 years ago.
Improve this question
I have an arbitrary expression in a string. Let's say:
y=12*x+34
I will have x or y and I need to solve for the other.
muParser does a brilliant job of solving the first form given x but it and all the other math parsers I've found cannot perform any sort of manipulation to turn the expression into:
x=(y-34)/12 so the other could be solved if I had y instead of x.
Is there a C/C++ library out there that isn't GNU encumbered that can be used to solve this?
It looks like you want to embed a proper CAS. Try GiNaC, if it is not powerful enough, think of embedding Maxima or Axiom (both are very heavyweight and runs on top of Common Lisp).
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.