[ANN] SimplicialCubature.jl


I made a package for the numerical integration of a multivariate function on a simplex: SimplicialCubature.jl.

This is a port of the R package SimplicialCubature. The integration is adaptive.

There’s also a function for the computation of the exact value of the integral in the case when the function is polynomial.

Related blog post: Integral over a polyhedron.


@_stla can you add references to the methods used? Also, the appearance of the code reminds Fortran/C… Be careful if you are copying/pasting code from other software projects with specific software license terms.


Ok, I will add the references.

The original code is written in Matlab and Fortran, written by Alan Genz. The R package has been written by someone else, John P. Nolan. He mentions Alan Genz in the description file of the package.

When I do a R package whose code is a translation from another language, I add the original author name in the authors list, and I specify he/she is copyright holder. Maybe I should do that for my Julia package. Where can I add a sentence like “Code adapted from …”?

The license of the R package SimplicialCubature is GPL >= 2.

How do you recognize Fortran ?

Take a look at the license text, it usually tells you what to do. In any case, you can always contact the person to ask them how they want to be credited, i’m sure they will be pleased their code is ported to another language. :slight_smile:

As far as I understand your code must also be GPL as code derived from GPL. That is a very important information as many Julia devs (myself included) cannot afford the terms of GPL.

1 Like

Ok. I wrote an email to the author of the R package and I changed the license. Thanks.

1 Like

Might also be good to provide an exact reference, typically people don’t write a single piece of code ever. BTW, is that the same algorithm already provided by several different packages


Edit: ok, reference is in the documentation, I looked only at the README in the repository. Looks like a different algorithm.

I think the packages you mention allow integration on rectangular domains only, not on simplices.

1 Like