stevengj / cubature Goto Github PK
View Code? Open in Web Editor NEWmulti-dimensional adaptive integration (cubature) in C
License: Other
multi-dimensional adaptive integration (cubature) in C
License: Other
I would like to thank you for your very interesting work, I am not very familiar with the mathematical derivations, but I am very keen to incorporate your software in my day-to-day research work. To do so, I would have a very simple question:
Is it possible to use this library to compute the volume and surface moments of any convex shape ?
Excellent code thank you. Is it possible to make it easier to compile static libraries on MacOS as well?
I wanted to include the hcubature code in another GPL project. Then I noticed that the COPYING
file says the project is under GPL v3. But inside hcubature.c
it states GPL v2. Now which is the right version of the license? I know this is a boring detail but you can presumably clear this up easily.
For large integrals and using parallel evaluation, the memory usage for the array of regions to evaluate becomes a limiting factor, before the size of the heap becomes an issue.
Would imposing a maximum batch size maintain correctness of the parallel algorithm?
That is, break out of the inner 'do' loop in the parallel branch of rulecubature if nR exceeds a fixed size.
It seems to work empirically in a few cases, but I'm unsure of the theory.
The equations in the README are unreadable on a dark background.
I believe it should now be possible to just use inline LaTeX instead of images.
Dear all,
Is there interest to implement a continuous integration scheme using GitHub actions? I have done that in the Cubature Python wrapper., which makes it convenient to evaluate if a new commit is causing unintended side effects.
Kind regards,
Saullo
From ChaoranHu/coga#6
Hello,
when trying to install cubature (from coga) I get the following errors under R3xx and R4xx
cc -g -O2 -fpic -USOLARIS -DRCPP_USE_UNWIND_PROTECT -I. -I../inst/include -DHAVE_CONFIG_H -DREALSIZE=8 -I./src/common -I. -I. -I./src/divonne -DNOUNDERSCORE -c -o Divonne.o ./src/divonne/Divonne.c
In file included from ./src/divonne/common.c:14:0,
from ./src/common/CSample.c:77,
from ./src/divonne/Divonne.c:14:
./src/divonne/Split.c: In function ‘SolveEqs’:
./src/divonne/Split.c:119:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
for(int first_time = 1 ; c >= cut; --c) {
^
./src/divonne/Split.c:119:3: note: use option -std=c99 or -std=gnu99 to compile your code
make[1]: Leaving directory `/tmp/RtmpaENKVE/R.INSTALL2f954222bc19/cubature/src/Cuba-4.2'
make[1]: *** [libcuba.a(Divonne.o)] Error 1
make: *** [cuba.ts] Error 2
ERROR: compilation failed for package ‘cubature’
* removing ‘/stornext/Home/data/allstaff/m/mangiola.s/R/x86_64-pc-linux-gnu-library/3.6/cubature’
* restoring previous ‘/stornext/Home/data/allstaff/m/mangiola.s/R/x86_64-pc-linux-gnu-library/3.6/cubature’
Error: Failed to install 'coga' from GitHub:
(converted from warning) installation of package ‘cubature’ had non-zero exit status
If I use the -std=c99 I get the following warning
cc1plus: warning: command line option ‘-std=c99’ is valid for C/ObjC but not for C++
It is possible to avoid this all together?
When trying the installation of 'cubature' R package in CentOS, which is a R package to use your C++ library "cubature" in R, I got the following report:
In file included from ./src/divonne/common.c:14:0,
from ./src/common/CSample.c:77,
from ./src/divonne/Divonne.c:14:
./src/divonne/Split.c: In function ‘SolveEqs’:
./src/divonne/Split.c:119:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
for(int first_time = 1 ; c >= cut; --c) {
^
./src/divonne/Split.c:119:3: note: use option -std=c99 or -std=gnu99 to compile your code
make[1]: *** [libcuba.a(Divonne.o)] Error 1
make[1]: Leaving directory `/tmp/RtmpzyLsw8/R.INSTALLec444ba5a993/cubature/src/Cuba-4.2'
make: *** [cuba.ts] Error 2
ERROR: compilation failed for package ‘cubature’
There is not problem at all on Linux OS.
Would you please help me with this issue?
Best,
Robersy
Hello,
In the README, you mention the R interface, the Python interface and the Julia interface. I've just ported your library to Haskell. Maybe you would want to mention it as well? (I can do a PR if you prefer).
Hi,
I am to integrate a complex function in one variable f : R -> C. I wonder if I can estimate theoretical how many evaluations will be needed to do it based on the absolute and relative errors (using h-cubature).
I did a quick look at J. Berntsen, T. O. Espelid, and A. Genz, “An adaptive algorithm for the approximate calculation of multiple integrals,” ACM Trans. Math. Soft. 17 (4), 437–451 (1991)., and I've seen some experimental results, but no theoretical one.
In the case that cubature is used in a project, or to produce results in a publication, how is it best to cite this software?
Also, there are citations for describing the h-adaptive method. Are there similar citations for the p-adaptive method? Currently there is a link to the wikipedia page, is there something more formal that was used to implement the p-adaptive method?
It might be worth updating the readme on these issues.
I have a need to change the numeric type to something that will allow me to do numerical differentiation with multicomplex algebra or algorithmic differentiation, and I was wondering if anyone has ported this library to modern C++. I might be convinced to do it myself, but it wouldn't be trivial, of that I am sure.
I got a bug report on my R package from a user and found that hcubature is having trouble with a simple integral of x * f(x) where f is 2-d multivariate normal density.
I provide a reproducible example on my repo
I checked that the problem occurs both on Unix and Mac. Pcubature works nicely though!
Hi Steven,
I am a maintainer of the Debian Astro Pure Blend, and I am currently working to package cubature for Debian (see Debian#940903 for the announcement). I need it as a new dependency for Purify 3.0. The packaging happens on gitlab here.
This issue is at first to let you know about our efforts. If you have comments or hints, they are very welcome.
Since the last version is already quite long ago, and there are significant improvements with the build system: do you plan to create a new version in the next future?
Best regards
Ole
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.