octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Looking to get involved: implementing integral, integral2, integral3


From: Jeremy Whitton
Subject: Re: Looking to get involved: implementing integral, integral2, integral3
Date: Wed, 6 Aug 2014 07:26:02 -0700

C.,

While I agree that the integral functions are very similar to pre-existing octave functions, they do have some functionality which other functions do not (at least as far as I know; do correct me if I am wrong). 

For instance, the integral function supports an "ArrayValued" option, which quadgk does not (though this probably wouldn't be terribly hard to implement). Further, integral2 and integral3 support both a 'tiled' integration method as well as an 'iterated' integration method. dblquad only implements an iterated method (but again, if this tiled functionality exists elsewhere in octave, please tell me). Implementing a tiled method would probably be harder, which is why I was thinking of using the cubature code that I found. I could alternatively attempt to implement it myself in octave code as opposed to C code.

I will also say that dblquad only allows for rectangular integration limits, while integral2 allows for limits of the form c(x) < y < d(x), for arbitrary functions c and d (and the trplquad vs integral3 situation is analogous), but that should be trivial to implement.

Jeremy Whitton


On Wednesday, August 6, 2014 4:48 AM, c. <address@hidden> wrote:



On 5 Aug 2014, at 23:01, Jeremy Whitton <address@hidden> wrote:

> Hello,
>
> Firstly, I've never contributed to a free software project before.
>
> I've recently been working with Matlab, and the code I'm using has dependencies on the integral2 function. Sadly, this function is unimplemented in octave, meaning I can't run it on my home computer, etc.. So on a whim, I've decided to try my hand at implementing it, as well as integral and integral3, since they are related.
>
> I think that the most reasonable way of implementing integral2 and integral3 is probably to use this code:
> http://ab-initio.mit.edu/wiki/index.php/Cubature
> It's licensed under the GPLv3, so no problems there.
> My reasoning for this is that integral2 and integral3 both support a "tiled" method, which seems to correspond to what this cubature code does.
>
> Things I will probably have trouble with:
> - Interfacing between the cubature code and the octave code. I've noticed that there is an octave_function class, which apparently represents octave function handles, used by quadcc. However, since the cubature code is written in C as opposed to C++, I'm not really sure how to go about using it. Should I make a C++ file as an intermediate? Should I attempt to convert the cubature code to C++ code?
> - Compiling. The makefile is massive and rather poorly commented, so I have no idea where I would put rules to ensure that the cubature code gets built correctly, and further how to build it in such a way that its function is accessible to be called from the octave code.
> - General newbishness. My suggestions have probably broken a hundred rules already.
>
> I will say that I at least read the contributing guidelines in the documentation, so I have that going for me.
>
> Any help, advice, etc. is greatly appreciated.
>
> Thanks,
> Jeremy Whitton

This topic has been already discussed here:
https://savannah.gnu.org/bugs/?func=detailitem&item_id=42037

the functions "integral integral2 and integral3"
are not adding new functionality to Matlab, they're
just a change of name for the previous funcions
named "quad", "dblquad", etc. ...

so there is not much programming involved in
implementing these functions in Octave, one should
just implement wrappers with the new names.

still this seems a good way to start for a first-time contributor.


c.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]