-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integration on general domains #20
Comments
I'm not sure I understand what you mean, could you please provide an example of what you would like to do? If you're asking for a way to integrate a domain different from the n-dimensional hypercube, then read the first "tip" box in the documentation: https://giordano.github.io/Cuba.jl/stable/ |
Say that I want to integrate on a domain A that is not a hyper-rectangle (in my case A is a n-dimensional convex polytope but that does not really matter here). What I would do is to compute the smallest hyper-rectangle B such that A \in B and pass the bounds defined by B to Cuba. The function to be integrated would just return f(x) = 0 if x \in (B \ A). Do you think this would work? |
If you are going to integrate a function on a domain larger than what you want, and define the integrand such that it returns zero outside the domain on which you actually want to integrate, yes, that would do the trick. |
@arbenede did it solve your issue? |
Mose`, I did not have a chance to try this yet however I think that you can close this issue for now. |
I'm going to close this issue, then. Feel free to ping me here if you come across the same problem again |
I am wondering if it possible to integrate an n-dimensional function on a set that is not an n-dimensional box in a way similar to the Monte Carlo integration routines in Numerical Recipes. If the function returns 0 when x is not in the set maybe this will just work in the current implementation of Cuba.jl?
The text was updated successfully, but these errors were encountered: