tensap.approximation.integration package¶
Submodules¶
tensap.approximation.integration.integration_rules module¶
Module integration_rules.
-
class
tensap.approximation.integration.integration_rules.
FullTensorProductIntegrationRule
(points, weights)¶ Bases:
tensap.approximation.integration.integration_rules.IntegrationRule
Class FullTensorProductIntegrationRule.
Methods
gauss
(random_variable, *args)Call the method gauss_integration_rule of tensap.RandomVariable or tensap.RandomVector.
integrate
(fun)Integrate the function fun using the integration rule.
ndim
()Return the number of integration points.
tensorize
(dim)Create a tensap.FullTensorProductIntegrationRule in dimension dim using the object.
Return the weights on the grid.
-
integrate
(fun)¶ Integrate the function fun using the integration rule.
- Parameters
- funfunction
The function to be integrated.
- Returns
- int
The integrated function using the integration rule.
-
ndim
()¶ Return the number of integration points.
- Returns
- int
The number of integration points.
-
weights_on_grid
()¶ Return the weights on the grid.
- Returns
- numpy.ndarray
The weights on the grid.
-
-
class
tensap.approximation.integration.integration_rules.
IntegrationRule
(points, weights)¶ Bases:
object
Class IntegrationRule.
- Attributes
- pointsnumpy.ndarray
The integration points.
- weightsnumpy.ndarray
The integration weights.
Methods
gauss
(random_variable, *args)Call the method gauss_integration_rule of tensap.RandomVariable or tensap.RandomVector.
integrate
(fun)Integrate the function fun using the integration rule.
ndim
()Return the number of integration points.
tensorize
(dim)Create a tensap.FullTensorProductIntegrationRule in dimension dim using the object.
-
static
gauss
(random_variable, *args)¶ Call the method gauss_integration_rule of tensap.RandomVariable or tensap.RandomVector.
- Parameters
- random_variabletensap.RandomVariable or tensap.RandomVector
The random variable or vector associated to which the integration rule is to be computed.
- *argsmisc
Additional arguments.
- Returns
- tensap.IntegrationRule
The integration rule associated with the random variable or vector.
-
integrate
(fun)¶ Integrate the function fun using the integration rule.
- Parameters
- funfunction
The function to be integrated.
- Returns
- int
The integrated function using the integration rule.
-
ndim
()¶ Return the number of integration points.
- Returns
- int
The number of integration points.
-
tensorize
(dim)¶ Create a tensap.FullTensorProductIntegrationRule in dimension dim using the object.
- Parameters
- dimint
The dimension of the tensap.FullTensorProductIntegrationRule.
- Returns
- tensap.FullTensorProductIntegrationRule
The integration rule in dimension dim.