|
From: | Michele |
Subject: | Re: expint: help with C++ |
Date: | Thu, 17 Aug 2017 23:23:18 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
On 08/17/2017 10:59 PM, John W. Eaton wrote:
On 08/17/2017 09:11 AM, Michele wrote:I was thinking on move the Lentz algorithm of expint on a separate .cc file which will be called by expint.m. The problem is that I need it to work with the complex and I'm having some troubles when compiling. I attach the file and the log of the error.Moving this to C++ is OK, but I think it should be in some functions in liboctave, not only accessible using a DEFUN. Then the DEFUN is a simple wrapper for the lower-level C++ function.If you can, make the function a template to avoid code duplication. jwe
Daniel, thank for your suggestion. It helped me a lot.JWE, I'm not expert in C++ and I don't think I will be able to make a template before GSoC ends. Anyway, I think that after it, with the help of the community, we can find a way to "simplify" the code. Moreover, we could make a template also for the Lentz algorithm of other functions (e.g. betainc and gammainc).
-- Michele Ginesi
[Prev in Thread] | Current Thread | [Next in Thread] |