T
T
tugo2016-05-21 17:35:50
Programming
tugo, 2016-05-21 17:35:50

Mathematical calculations in a Qt application. What is the easiest library to embed in a Qt application?

I want to write a standalone application into which you can load a script in some powerful high-level language (R, Python, JavaScript, etc.)
The source data file is selected, the script is selected. Calculations are being made.
If the text of the script contains something like

QVector v;
...
plot (v, "x", "y");

a graph is built using Qt (I wrote a convenient widget for plotting graphs).
How many lines "plot" met - so many graphs.
Commands are sent to the math engine, for example, like this
MathEngine engine;
QString cmd = ui->commandEdtor->text();
Result result = engine.evaluate(cmd);

From the engine, the result of calculations is somehow obtained and converted to c++ data types.
I tried to embed the R language using the RInside libraries, Rcpp - did not figure it out.
How is it easier and what kind of engine to embed, a library for mathematical calculations?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
#
#algooptimize #bottize, 2016-05-21
@user004

main >> input file >>any script >> output file >>
main

R
Roman Mirilaczvili, 2016-05-21
@2ord

You can use the MATLAB-like language Julia as the libjulia library. Without any tricks, highly-optimized calculations are obtained.
Whether it's easier to use than others - I don't know, it depends on experience, availability of documentation and diligence.
Here is an additional link: julia-dev> Embedding julia?

M
Maxim, 2016-05-22
@khrisanfov

Why did you need to draw a graph in Qt? R has many different plotting packages. You can execute an R script through QProcess and output the result (graph) to a Qt application.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question