forum.alglib.net
http://forum.alglib.net/

Adaptive Gauss-Kronrod quadrature, C++
http://forum.alglib.net/viewtopic.php?f=2&t=3117
Page 1 of 1

Author:  iman_day [ Wed Jul 29, 2015 4:06 pm ]
Post subject:  Adaptive Gauss-Kronrod quadrature, C++

I need to find an equivalent for MATLAB function "quadgk" in C++. I am aware of ALGLIB "autogk subpackage", but it seems so complicated to me and for some reason I was not able to use it. More precisely, my understanding is that the code is designed for a non parametric function (e.g. y = exp(x)), see Example: http://www.alglib.net/translator/man/manual.cpp.html#example_autogk_d1

However, my function is more sophisticated and has several parameters that I need to update before each use of the function. These parameters need to be passed to "void int_function_1_func" as arguments, while this requires many other changes in the code.

In the attached file "Code.cpp", one can notice that I need four parameters t1, t2, t3, and t4 to define my function "y".

Any idea how I can come up with a solution?

Thanks in advance.

Attachments:
Code.h [463 Bytes]
Downloaded 892 times
Code.cpp [1.02 KiB]
Downloaded 896 times

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/