moptipy.operators.vectors package

Operators for vector spaces.

Submodules

moptipy.operators.vectors.op0_uniform module

A nullary operator filling a vector with uniformly distribute values.

class moptipy.operators.vectors.op0_uniform.Op0Uniform(space)[source]

Bases: Op0

Fill a vector with uniformly distributed random values.

log_parameters_to(logger)[source]

Log the parameters of this operator to the given logger.

Parameters:

logger (KeyValueLogSection) – the logger for the parameters

Return type:

None

op0(random, dest)[source]

Fill the string dest with random values.

Parameters:
  • random (Generator) – the random number generator

  • dest (ndarray) – the vector to be filled. Afterwards it contains uniformly distributed random values

Return type:

None

space: Final[VectorSpace]

store the space