Class ParameterizationFunction


  • public class ParameterizationFunction
    extends java.lang.Object
    A parameterization function describes 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.
    Since:
    0.1
    Author:
    Elke Achtert
    • 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.
    • Constructor Detail

      • ParameterizationFunction

        public ParameterizationFunction​(NumberVector vec)
        Provides a new parameterization function describing all lines in a d-dimensional feature space intersecting in one point p.
        Parameters:
        vec - Existing vector
    • Method Detail

      • 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 java.lang.String toString()
        Returns a string representation of the object.
        Overrides:
        toString in class java.lang.Object
        Returns:
        a string representation of the object.
      • toString

        public java.lang.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

        public static 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 of 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
      • getColumnVector

        public double[] getColumnVector()
        Get the actual vector used (as copy).
        Returns:
        Vector, for projection
      • getDimensionality

        public int getDimensionality()
        Get the vector dimensionality.
        Returns:
        Vector dimensionality