 |
Synthia
Generic and flexible data structure generator
|
Go to the documentation of this file. 1 package ca.uqac.lif.synthia.util;
35 private DiscardRatio(
float ratio,
int generated_counter,
int discarted_counter)
int m_discartedCounter
Discarted generated object counter.
final float m_maxRejectedRatio
Max rejected ratio of generated object autorized.
Float pick()
Picks an object.
void reset()
Puts the picker back into its initial state.
void countAsAccepted()
Count the generated object as accepted.
A utility picker to calculate the discard ratio of a PickIf picker.
Returns object from a picker satisfying a condition.
Pickers that produce a value in relation to another value.
DiscardRatio duplicate(boolean with_state)
Creates a copy of the picker.
void countAsDiscarted()
Count the generated object as discarted.
int m_generatedCounter
Generated object counter.
DiscardRatio(float ratio)
An exception to throw to prevent the pick method of a PickIf picker from falling into an infinite loo...