# 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

References

1

https://en.wikipedia.org/wiki/Van_der_Corput_sequence

Attributes Summary

 requires_rng 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

__call__(bq_state, rng)[source]

Find nodes according to the policy.

Parameters
Returns

shape=(batch_size, input_dim) – Nodes found according to the policy.

Return type

nodes

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
• n_start (int) – First element of the van der Corput to be included (inclusive).

• n_end (Optional[int]) – Last element of the van der Corput to be included (exclusive). If not given, only the n_start element is returned.

Returns

Array containing elements from n_start to n_end - 1 of the van der Corput sequence.

Return type

vdc_seq