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: c.
Subject: Re: Looking to get involved: implementing integral, integral2, integral3
Date: Wed, 6 Aug 2014 18:10:05 +0200

On 6 Aug 2014, at 16:26, Jeremy Whitton <address@hidden> wrote:

> 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.

At first sight it looks to me like most of those functionalities could indeed 
be implemented as
extensions built on top of existing quadrature code in Octave, is this not the 
case?

> I could alternatively attempt to implement it myself in octave code as 
> opposed to C code.

Octave uses C++, no plain C.

In general, when possible, it is actually preferred to implement algorithms in 
Octave language
rather than C++ as it makes code easier to maintain.


> 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.

yes, it takes just a simple change of variables to switch from one to the 
other, I actally have code around that 
allows integration on any 2D or 3D domain of the form 

W = F (W'), W' = (0, 1)^d, d=2,3

F denoting a smooth invertible mapping with non-singular inverse.

> Jeremy Whitton


c.


reply via email to

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