VanDerCorputPolicy¶
- class probnum.quad.solvers.policies.VanDerCorputPolicy(batch_size, measure)¶
Bases:
Policy
Pick nodes from the van der Corput sequence.
The van der Corput sequence [1] is
\[0.5, 0.25, 0.75, 0.125, 0.625, \ldots\]If the integration domain is not [0, 1], the van der Corput sequence is linearly mapped to the domain. The domain must be finite.
- Parameters:
batch_size (IntLike) – Size of batch of nodes when calling the policy once.
measure (IntegrationMeasure) – The integration measure with finite domain.
- Raises:
ValueError – If input dimension is not 1.
ValueError – If measure domain is not bounded.
References
Attributes Summary
Whether the policy requires a random number generator when called.
Methods Summary
__call__
(bq_state, rng)Find nodes according to the policy.
van_der_corput_sequence
(n_start[, n_end])Returns elements
n_start
,n_start + 1
, ...,n_end - 1
in the van der Corput sequence.Attributes Documentation
- requires_rng¶
Methods Documentation
- static van_der_corput_sequence(n_start, n_end=None)[source]¶
Returns elements
n_start
,n_start + 1
, …,n_end - 1
in the van der Corput sequence.\[0.5, 0.25, 0.75, 0.125, 0.625, \ldots\]If no
n_end
is given, only a single element in the sequence is returned.- Parameters:
- Returns:
Array containing elements from
n_start
ton_end - 1
of the van der Corput sequence.- Return type:
vdc_seq