@DefaultProvider(value=PreferenceDomainQuantizer.AutoProvider.class) public interface Quantizer
PreferenceDomainQuantizer
will be used to implement this interface.Modifier and Type | Method and Description |
---|---|
int |
getCount()
Get the number of discrete values the output can take.
|
double |
getIndexValue(int i)
Get the value corresponding to a quantized value, based on the index into
the list of possible values.
|
mikera.vectorz.impl.ImmutableVector |
getValues()
Get the possible values into which this quantizer will map input values.
|
int |
index(double val)
Convert a value into a discrete, quantized value.
|
double |
quantize(double val)
Convert a value into a quantized value, returning the quantized value.
|
mikera.vectorz.impl.ImmutableVector getValues()
double getIndexValue(int i)
i
- The quantized value number, in the range [0,n) where n is the number of
possible discrete values (see getCount()
).i
.IllegalArgumentException
- if i
is an invalid discrete value.int getCount()
int index(double val)
val
- A value to quantize.val
is mapped.double quantize(double val)
val
- A value to quantize.