You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: torchquad/integration/monte_carlo.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ def integrate(
27
27
28
28
Args:
29
29
fn (func): The function to integrate over.
30
-
dim (int): Dimensionality of the function to integrate.
30
+
dim (int): Dimensionality of the function's domain over which to integrate.
31
31
N (int, optional): Number of sample points to use for the integration. Defaults to 1000.
32
32
integration_domain (list or backend tensor, optional): Integration domain, e.g. [[-1,1],[0,1]]. Defaults to [-1,1]^dim. It can also determine the numerical backend.
33
33
seed (int, optional): Random number generation seed to the sampling point creation, only set if provided. Defaults to None.
Copy file name to clipboardExpand all lines: torchquad/integration/vegas.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -45,10 +45,11 @@ def integrate(
45
45
"""Integrates the passed function on the passed domain using VEGAS.
46
46
47
47
If the integrand output is far away from zero, i.e. lies within [b, b+c] for a constant b with large absolute value and small constant c, VEGAS does not adapt well to the integrand. Shifting the integrand so that it is close to zero may improve the accuracy of the calculated integral in this case.
48
+
This method does not support multi-dimensional/vectorized integrands (i.e., integrating an integrand repeatedly over a grid of points).
48
49
49
50
Args:
50
51
fn (func): The function to integrate over.
51
-
dim (int): Dimensionality of the function to integrate.
52
+
dim (int): Dimensionality of the function's domain over which to integrate.
52
53
N (int, optional): Approximate maximum number of function evaluations to use for the integration. This value can be exceeded if the vegas stratification distributes evaluations per hypercube very unevenly. Defaults to 10000.
53
54
integration_domain (list, optional): Integration domain, e.g. [[-1,1],[0,1]]. Defaults to [-1,1]^dim.
54
55
seed (int, optional): Random number generation seed for the sampling point creation; only set if provided. Defaults to None.
0 commit comments