- #1
Trajito
- 6
- 0
Hello,
I am trying to write a code taking path integrals in C++, using GNU Scientific Library. GSL is mainly written for C and does not include classes and other object-oriented language stuff, but it's also compatible with C++. Thus, what I first tried was making use of classes with GSL.
Since Feynman path integral formulation requires complex integration, I should first extend the standard GSL Monte Carlo function's abilities to taking complex integrals. I want to divide a function into two, real part and imaginary part. However, if I write a function which returns the real part of what is returned in the original function, my converting function must take the original function as its argument. But this brings trouble because GSL can integrate functions whose arguments must be (double [], size_t, void*). So, I have to return a function from a function.
Thank you
I am trying to write a code taking path integrals in C++, using GNU Scientific Library. GSL is mainly written for C and does not include classes and other object-oriented language stuff, but it's also compatible with C++. Thus, what I first tried was making use of classes with GSL.
Since Feynman path integral formulation requires complex integration, I should first extend the standard GSL Monte Carlo function's abilities to taking complex integrals. I want to divide a function into two, real part and imaginary part. However, if I write a function which returns the real part of what is returned in the original function, my converting function must take the original function as its argument. But this brings trouble because GSL can integrate functions whose arguments must be (double [], size_t, void*). So, I have to return a function from a function.
Thank you