@Shareable public class ValueArrayQuantizer extends Object implements Quantizer, Serializable
Modifier and Type | Field and Description |
---|---|
protected double[] |
values
The values to quantize to.
|
Constructor and Description |
---|
ValueArrayQuantizer(double[] vs)
Construct a new quantizer using the specified array of values.
|
Modifier and Type | Method and Description |
---|---|
int |
apply(double v)
Deprecated.
|
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.
|
double |
getValue(int i)
Deprecated.
|
double[] |
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.
|
protected final double[] values
public ValueArrayQuantizer(double[] vs)
vs
- The discrete values to quantize to.public double[] getValues()
Quantizer
@Deprecated public double getValue(int i)
Quantizer
getValue
in interface Quantizer
i
- The quantized value number, in the range [0,n) where n is the number of
possible discrete values (see Quantizer.getCount()
).i
.@Deprecated public int apply(double v)
Quantizer
public int getCount()
Quantizer
public double getIndexValue(int i)
Quantizer
getIndexValue
in interface Quantizer
i
- The quantized value number, in the range [0,n) where n is the number of
possible discrete values (see Quantizer.getCount()
).i
.public int index(double val)
Quantizer
Copyright © 2013 GroupLens Research. All Rights Reserved.