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 last year.
Improve this question
I need to port a piece of code from matlab into C or C++. Matlab implementation of the code extensively use reshape and permute functions to manipulate the layout of multidimensional arrays. Is there any library in c or c++ to get effect of these two matlab routines. Any suggestion would be helpful.
You can use OpenCV library, which contains similar Mat::reshape() routines to do transforms and permutations.
If someone has found the answer for the Matlab permute function I am interrested.
I think the reshape can be done with boost::multi_array::reshape.
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 6 years ago.
Improve this question
For a dataset of N records and M columns (features), I want to visualize it in 2d or 3d. Does anyone know if such a c++ library exists?
Thanks to #MatthewLueder's comment pointing out the PCA, I found libpca.
I assume you want online plotting. That is, animation plot at runtime, correct?
If so, then there are few libraries and one of which is gnuplot-iostream http://www.stahlke.org/dan/gnuplot-iostream/. I use it and recommend it. It requires the Boost library however.
Otherwise, you can write your data on files and use in a subsequent step a visualizer of your choice. Again, gnuplot is very powerful.
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
Is there a tool that converts C++ code into fortran? Please state any possible deficiency of the tool you use.
I know it sounds silly but I do have a C++ code that calls a big Fortran code inside and I need to to use OpenMP. I am trying to keep the parallel region only inside Fortran (because there are many COMMON blocks and EQUIVALENCEs used) so I have to translate a few hundreds of lines of C++ functions to Fortran.
Depending on the compiler (such as the GNU compilers), you're actually able to compile C, C++, Fortran, etc. code together. This is so you don't actually have to translate or rewrite that code. C++ Forum Answer
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 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).