@Shareable public class PreferenceDomainQuantizer extends ValueArrayQuantizer
Quantizer that uses a range and precision to determine discrete values. Values are rounded to the closest discrete value.
Modifier and Type | Class and Description |
---|---|
static class |
PreferenceDomainQuantizer.AutoProvider |
values
Constructor and Description |
---|
PreferenceDomainQuantizer(double min,
double max,
double prec)
Create a new preference domain quantizer.
|
PreferenceDomainQuantizer(PreferenceDomain dom)
Create a new quantizer from a discrete preference domain.
|
Modifier and Type | Method and Description |
---|---|
PreferenceDomain |
getPreferenceDomain() |
getCount, getIndexValue, getValues, index, quantize
@Inject public PreferenceDomainQuantizer(PreferenceDomain dom)
Create a new quantizer from a discrete preference domain.
dom
- The preference domain.IllegalArgumentException
- if the domain is not discrete.public PreferenceDomainQuantizer(double min, double max, double prec)
Create a new preference domain quantizer.
public PreferenceDomain getPreferenceDomain()