
public class PolynomialApproximation extends Object implements Externalizable
| Modifier and Type | Field and Description |
|---|---|
private double[] |
b
The parameters b0, ..., bp.
|
private static long |
serialVersionUID |
| Constructor and Description |
|---|
PolynomialApproximation()
Empty constructor for serialization purposes.
|
PolynomialApproximation(double[] b)
Provides an polynomial approximation bo + b1*k + b2*k^2 + ... + bp*k^p
for knn-distances consisting of parameters b0, ..., bp.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getB(int p)
Returns the parameter bp at the specified index p.
|
double[] |
getCoefficients()
Returns a copy of the the array of coefficients b0, ..., bp.
|
int |
getPolynomialOrder()
Returns the order of the polynom.
|
double |
getValueAt(int k)
Returns the function value of the polynomial approximation
at the specified k.
|
void |
readExternal(ObjectInput in)
The object implements the readExternal method to restore its
contents by calling the methods of DataInput for primitive
types and readObject for objects, strings and arrays.
|
String |
toString()
Returns a string representation of the object.
|
void |
writeExternal(ObjectOutput out)
The object implements the writeExternal method to save its contents
by calling the methods of DataOutput for its primitive values or
calling the writeObject method of ObjectOutput for objects, strings,
and arrays.
|
private static final long serialVersionUID
private double[] b
public PolynomialApproximation()
public PolynomialApproximation(double[] b)
b - the parameters b0, ..., bipublic double getB(int p)
p - the indexpublic double[] getCoefficients()
public int getPolynomialOrder()
public double getValueAt(int k)
k - the value for which the polynomial approximation should be returnedpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface Externalizableout - the stream to write the object toIOExceptionpublic void readExternal(ObjectInput in) throws IOException
readExternal in interface Externalizablein - the stream to read data from in order to restore the objectIOExceptionCopyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.