/** * Reallocates bins from one treatment to another * @param sourceTreatmentName The source treatment * @param destinationTreatmentName The destination treatment * @param size The number of bins */ public Experiment reallocate(String sourceTreatmentName, String destinationTreatmentName, int size) { allocations.reallocate( treatment(sourceTreatmentName), treatment(destinationTreatmentName), size ); return this; }
/** * Allocates bins to a treatment * @param treatmentName The treatment * @param size The number of bins */ public Experiment allocate(String treatmentName, int size) { allocations.allocate(treatment(treatmentName), size); return this; }
/** * De-allocates bins from a treatment * @param treatmentName The treatment * @param size The number of bins */ public Experiment deallocate(String treatmentName, int size) { allocations.deallocate(treatment(treatmentName), size); return this; }
/** * Add a treatment override for an identity * @param treatmentName The treatment an identity should receive * @param overrideName The name of the override * @param filter A filter expression that describes which attributes this override should apply for */ public Experiment addOverride(String overrideName, String treatmentName, String filter) { final FilterExpression filterExp = FilterExpression.of(filter); final TreatmentOverride override = new TreatmentOverride(overrideName, filterExp, treatment(treatmentName)); overrides.put(overrideName, override); return this; }