Skip to content

Commit

Permalink
Integrand compute_flags docs for f,g
Browse files Browse the repository at this point in the history
  • Loading branch information
alegresor committed Mar 20, 2022
1 parent d6ad6a9 commit d8b7234
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions qmcpy/integrand/_integrand.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,16 @@ def __init__(self, dprime, parallel):
raise ParameterError("The range of the composed transform is not compatibe with this true measure")
self.EPS = finfo(float).eps

def g(self, t, *args, **kwargs):
def g(self, t, compute_flags=None, *args, **kwargs):
"""
ABSTRACT METHOD for original integrand to be integrated.
Args:
t (ndarray): n x d array of samples to be input into original integrand.
compute_flags (ndarray): outputs that require computation.
For example, if the vector function has 3 outputs and compute_flags = [False, True, False],
then the function is only required to compute the second output and may leave the remaining outputs as e.g. 0.
The False outputs will not be used in the computation since those integrals have been sufficiently approximated.
Return:
ndarray: n vector of function evaluations
Expand All @@ -62,7 +66,10 @@ def f(self, x, periodization_transform='NONE', compute_flags=None, *args, **kwar
Args:
x (ndarray): n x d array of samples from a discrete distribution
periodization_transform (str): periodization transform
compute_flags (ndarray): TODO
compute_flags (ndarray): outputs that require computation.
For example, if the vector function has 3 outputs and compute_flags = [False, True, False],
then the function is only required to compute the second output and may leave the remaining outputs as e.g. 0.
The False outputs will not be used in the computation since those integrals have been sufficiently approximated.
*args: other ordered args to g
**kwargs (dict): other keyword args to g
Expand Down

0 comments on commit d8b7234

Please sign in to comment.