Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.data
Class ParameterizationFunction

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.logging.AbstractLoggable
      extended by de.lmu.ifi.dbs.elki.data.AbstractDatabaseObject
          extended by de.lmu.ifi.dbs.elki.data.NumberVector<V,N>
              extended by de.lmu.ifi.dbs.elki.data.RealVector<DoubleVector,Double>
                  extended by de.lmu.ifi.dbs.elki.data.DoubleVector
                      extended by de.lmu.ifi.dbs.elki.data.ParameterizationFunction
All Implemented Interfaces:
WekaObject<WekaNumericAttribute>, DatabaseObject, FeatureVector<DoubleVector,Double>, SpatialComparable, SpatialObject, Loggable

public class ParameterizationFunction
extends DoubleVector

A parameterization function decribes all lines in a d-dimensional feature space intersecting in one point p. A single line in d-dimensional space is uniquely determined by a translation vector p and (d-1) angles alpha_i belonging to the normal vector n.

Author:
Elke Achtert

Nested Class Summary
static class ParameterizationFunction.ExtremumType
          Available types for the global extremum.
 
Field Summary
private  double[] alphaExtremum
          Holds the alpha values of the global extremum.
static double DELTA
          A small number to handle numbers near 0 as 0.
private  ParameterizationFunction.ExtremumType extremumType
          Holds the type of the global extremum.
 
Fields inherited from class de.lmu.ifi.dbs.elki.data.NumberVector
ATTRIBUTE_SEPARATOR
 
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debug
 
Constructor Summary
ParameterizationFunction(double[] p)
          Provides a new parameterization function decribing all lines in a d-dimensional feature space intersecting in one point p.
 
Method Summary
private  double determineAlphaMax(int n, double[] alpha_max, HyperBoundingBox interval)
          Determines the n-th alpha value where this function has a maximum in the specified interval.
private  double determineAlphaMin(int n, double[] alpha_min, HyperBoundingBox interval)
          Determines the n-th alpha value where this function has a minimum in the specified interval.
 HyperBoundingBox determineAlphaMinMax(HyperBoundingBox interval)
          Determines the alpha values where this function has a minumum and maximum value in the given interval.
private  void determineGlobalExtremum()
          Determines the global extremum of this parameterization function.
private  void determineGlobalExtremumType()
          Determines the type od the global extremum.
private  double extremum_alpha_n(int n, double[] alpha)
          Determines the value for alpha_n where this function has a (local) extremum.
private  ParameterizationFunction.ExtremumType extremumType(int n, double[] alpha_extreme, HyperBoundingBox interval)
          Returns the type of the extremum at the specified alpha values.
 double function(double[] alpha)
          Computes the function value at alpha.
 double[] getGlobalAlphaExtremum()
          Returns the alpha values of the extremum point in interval [(0,...,0), (Pi,...
 double getGlobalExtremum()
          Returns the global extremum of this function in interval [0,...
 ParameterizationFunction.ExtremumType getGlobalExtremumType()
          Returns the type of the global extremum in interval [0,...
 DoubleVector newInstance(double[] values)
          Returns a new RealVector of N for the given values.
private  double sinusProduct(int start, int end, double[] alpha)
          Computes the product of all sinus values of the specified angles from start to end index.
 String toString()
          Returns a string representation of the object.
 String toString(int offset)
          Returns a string representation of the object with the specified offset.
 
Methods inherited from class de.lmu.ifi.dbs.elki.data.DoubleVector
getColumnVector, getDimensionality, getRowVector, getValue, multiplicate, negativeVector, nullVector, plus, randomInstance, randomInstance
 
Methods inherited from class de.lmu.ifi.dbs.elki.data.NumberVector
equals, getAttributes, getMax, getMin, newInstance
 
Methods inherited from class de.lmu.ifi.dbs.elki.data.AbstractDatabaseObject
getID, setID
 
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debugFine, debugFiner, debugFinest, exception, message, progress, progress, progress, verbose, verbose, warning
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.lmu.ifi.dbs.elki.data.DatabaseObject
getID, setID
 
Methods inherited from interface de.lmu.ifi.dbs.elki.index.tree.spatial.SpatialObject
getID
 

Field Detail

DELTA

public static final double DELTA
A small number to handle numbers near 0 as 0.

See Also:
Constant Field Values

alphaExtremum

private double[] alphaExtremum
Holds the alpha values of the global extremum.


extremumType

private ParameterizationFunction.ExtremumType extremumType
Holds the type of the global extremum.

Constructor Detail

ParameterizationFunction

public ParameterizationFunction(double[] p)
Provides a new parameterization function decribing all lines in a d-dimensional feature space intersecting in one point p.

Parameters:
p - the values of the point p
Method Detail

newInstance

public DoubleVector newInstance(double[] values)
Description copied from class: RealVector
Returns a new RealVector of N for the given values.

Overrides:
newInstance in class DoubleVector
Parameters:
values - the values of the featureVector
Returns:
a new DoubleVector with the specified values
See Also:
RealVector.newInstance(double[])

function

public double function(double[] alpha)
Computes the function value at alpha.

Parameters:
alpha - the values of the d-1 angles
Returns:
the function value at alpha

determineAlphaMinMax

public HyperBoundingBox determineAlphaMinMax(HyperBoundingBox interval)
Determines the alpha values where this function has a minumum and maximum value in the given interval.

Parameters:
interval - the hyper bounding box defining the interval
Returns:
he alpha values where this function has a minumum and maximum value in the given interval

extremumType

private ParameterizationFunction.ExtremumType extremumType(int n,
                                                           double[] alpha_extreme,
                                                           HyperBoundingBox interval)
Returns the type of the extremum at the specified alpha values.

Parameters:
n - the index until the alpha values are computed
alpha_extreme - the already computed alpha values
interval - the hyper bounding box defining the interval in which the extremum occurs
Returns:
the type of the extremum at the specified alpha_values

determineAlphaMin

private double determineAlphaMin(int n,
                                 double[] alpha_min,
                                 HyperBoundingBox interval)
Determines the n-th alpha value where this function has a minimum in the specified interval.

Parameters:
n - the index of the alpha value to be determined
alpha_min - the already computed alpha values
interval - the hyper bounding box defining the interval
Returns:
the n-th alpha value where this function has a minimum in the specified interval

determineAlphaMax

private double determineAlphaMax(int n,
                                 double[] alpha_max,
                                 HyperBoundingBox interval)
Determines the n-th alpha value where this function has a maximum in the specified interval.

Parameters:
n - the index of the alpha value to be determined
alpha_max - the already computed alpha values
interval - the hyper bounding box defining the interval
Returns:
the n-th alpha value where this function has a minimum in the specified interval

getGlobalAlphaExtremum

public double[] getGlobalAlphaExtremum()
Returns the alpha values of the extremum point in interval [(0,...,0), (Pi,...,Pi)].

Returns:
the alpha values of the extremum

getGlobalExtremum

public double getGlobalExtremum()
Returns the global extremum of this function in interval [0,...,Pi)^d-1.

Returns:
the global extremum

getGlobalExtremumType

public ParameterizationFunction.ExtremumType getGlobalExtremumType()
Returns the type of the global extremum in interval [0,...,Pi)^d-1.

Returns:
the type of the global extremum

toString

public String toString()
Returns a string representation of the object.

Specified by:
toString in interface FeatureVector<DoubleVector,Double>
Overrides:
toString in class DoubleVector
Returns:
a string representation of the object.
See Also:
FeatureVector.toString()

toString

public String toString(int offset)
Returns a string representation of the object with the specified offset.

Parameters:
offset - the offset of the string representation
Returns:
a string representation of the object.

sinusProduct

private double sinusProduct(int start,
                            int end,
                            double[] alpha)
Computes the product of all sinus values of the specified angles from start to end index.

Parameters:
start - the index to start
end - the index to end
alpha - the array of angles
Returns:
the product of all sinus values of the specified angles from start to end index

determineGlobalExtremum

private void determineGlobalExtremum()
Determines the global extremum of this parameterization function.


determineGlobalExtremumType

private void determineGlobalExtremumType()
Determines the type od the global extremum.


extremum_alpha_n

private double extremum_alpha_n(int n,
                                double[] alpha)
Determines the value for alpha_n where this function has a (local) extremum.

Parameters:
n - the index of the angle
alpha - the already determined alpha_values for the extremum
Returns:
the value for alpha_n where this function has a (local) extremum

Release 0.1 (2008-07-10_1838)