|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.mktrees.mkapp.PolynomialApproximation
public class PolynomialApproximation
Provides an polynomial approximation bo + b1*k + b2*k^2 + ... + bp*k^p for knn-distances consisting of parameters b0, ..., bp.
Field Summary | |
---|---|
private double[] |
b
The parameters b0, ..., bp. |
private static long |
serialVersionUID
|
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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 polynoial 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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private double[] b
Constructor Detail |
---|
public PolynomialApproximation()
public PolynomialApproximation(double[] b)
b
- the parameters b0, ..., biMethod Detail |
---|
public double getB(int p)
p
- the index
public double[] getCoefficients()
public int getPolynomialOrder()
public double getValueAt(int k)
k
- the value for which the polynoial approximation should be returned
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
out
- the stream to write the object to
IOException
public void readExternal(ObjectInput in) throws IOException
readExternal
in interface Externalizable
in
- the stream to read data from in order to restore the object
IOException
public String toString()
toString
in class Object
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |