aub_htp.random.MixedSampler#

class aub_htp.random.MixedSampler(spectral_measures: list[BaseSpectralMeasureSampler], weights: ndarray)#

Bases: BaseSpectralMeasureSampler

__init__(spectral_measures: list[BaseSpectralMeasureSampler], weights: ndarray)#

Methods

__init__(spectral_measures, weights)

dimensions()

Number of dimensions of the vector space of the spectral measure.

mass()

Mass of the spectral measure.

sample(number_of_samples[, random_state])

Sampling algorithm for the spectral measure sampler.

dimensions() int#

Number of dimensions of the vector space of the spectral measure.

Returns#

dimensions : int

mass() float#

Mass of the spectral measure.

Returns#

mass : float

sample(number_of_samples: int, random_state: None | int | RandomState | Generator = None) ndarray#

Sampling algorithm for the spectral measure sampler.

Parameters#

number_of_samplesint

The number of samples to draw from the spectral measure.

random_stateNone | int | np.random.RandomState | np.random.Generator, optional

The random state to use for the sampling. You are encouraged to use aub_htp.random.get_random_state_generator() to get a random state generator as such: random_state = get_random_state_generator(random_state)

Returns#

samplesnp.ndarray

The samples from the spectral measure.