RandomAllocationValueService Reference Class
Source:R/class_random_allocation_value_service.R
RandomAllocationValueService-class.RdManages the generation and retrieval of random allocation values for randomization procedures. Maintains a reproducible sequence of random values using a seed, and provides methods for initialization, value creation, retrieval, and display.
Fields
seedInteger random seed used for reproducibility.
indexInteger index tracking the current position in the values vector.
valuesNumeric vector of generated random allocation values.
Methods
- initialize(...)
Initializes the service, setting the seed, index, and values.
- show()
Displays a summary of the service.
- toString()
Returns a string representation of the service.
- createNewRandomAllocationValues(randomConfiguration)
Generates new random allocation values based on the configuration.
- getNextRandomAllocationValue(randomConfiguration)
Retrieves the next random allocation value if available.