src.tests.vl3dpp_oversampler_test

Classes

VL3DPPOversamplerTest()

class src.tests.vl3dpp_oversampler_test.VL3DPPOversamplerTest
Author:

Alberto M. Esmoris Pena

Oversampling test that checks the C++ oversampling implementations.

__init__()

Basic configuration for any VL3D test.

Parameters:

name (str) – Test name

run()

Run C++ oversampling tests.

Returns:

True if the C++ oversampling works as expected for the test cases, False otherwise.

Return type:

bool

testOversample(X, target_points, nearest_spec, max_discrepancy_ratio=0.0)

Check that the C++ oversampling works as the Python reference oversampling.

Parameters:
  • X (np.ndarray) – The test structure space that must be oversampled.

  • target_points (int) – How many points must be obtained through oversampling (provided it is needed).

  • nearest_spec (dict) – The key-word arguments governing the oversampling.

  • max_discrepancy_ratio (float) – The ratio in \([0, 1]\) of points that can be different between the Python and C++ implementations.

Returns:

True if the C++ oversampling works as expected, False otherwise.

Return type:

bool