Class AbstractLambdaMethod

    • Constructor Detail

      • AbstractLambdaMethod

        protected AbstractLambdaMethod()
        Constructor.

        By default a IntegerLeastSquareComparator is used to compare integer least square solutions

    • Method Detail

      • solveILS

        public IntegerLeastSquareSolution[] solveILS​(int nbSol,
                                                     double[] floatAmbiguities,
                                                     int[] indirection,
                                                     RealMatrix covariance)
        Find the best solutions to an Integer Least Square problem.
        Specified by:
        solveILS in interface IntegerLeastSquareSolver
        Parameters:
        nbSol - number of solutions to search for
        floatAmbiguities - float estimates of ambiguities
        indirection - indirection array to extract ambiguity covariances from global covariance matrix
        covariance - global covariance matrix (includes ambiguities among other parameters)
        Returns:
        at most nbSol solutions a to the Integer Least Square problem, in increasing squared distance order
      • setComparator

        public void setComparator​(Comparator<IntegerLeastSquareSolution> newCompartor)
        Set a custom comparator for integer least square solutions comparison.

        Calling this method overrides any comparator that could have been set beforehand. It also overrides the default IntegerLeastSquareComparator.

        Parameters:
        newCompartor - new comparator to use
        Since:
        11.0
      • getDiagReference

        protected double[] getDiagReference()
        Get a reference to the diagonal matrix of the decomposition.

        BEWARE: the returned value is a reference to an internal array, it is only intended for subclasses use (hence the method is protected and not public).

        Returns:
        reference to the diagonal matrix of the decomposition
      • getLowReference

        protected double[] getLowReference()
        Get a reference to the lower triangular matrix of the decomposition.

        BEWARE: the returned value is a reference to an internal array, it is only intended for subclasses use (hence the method is protected and not public).

        Returns:
        reference to the lower triangular matrix of the decomposition
      • getDecorrelatedReference

        protected double[] getDecorrelatedReference()
        Get the reference decorrelated ambiguities.
        Returns:
        reference to the decorrelated ambiguities.
      • getMaxSolution

        protected int getMaxSolution()
        Get the maximum number of solutions seeked.
        Returns:
        the maximum number of solutions seeked
      • addSolution

        protected void addSolution​(long[] fixed,
                                   double squaredNorm)
        Add a new solution.
        Parameters:
        fixed - solution array
        squaredNorm - squared distance to the corresponding float solution
      • removeSolution

        protected void removeSolution()
        Remove spurious solution.
      • getSolutionsSize

        protected int getSolutionsSize()
        Get the number of solutions found.
        Returns:
        the number of solutions found
      • getMaxDistance

        protected double getMaxDistance()
        Get the maximum of distance among the solutions found. getting last of solutions as they are sorted in SortesSet
        Returns:
        greatest distance of the solutions
        Since:
        10.2
      • getZInverseTransformationReference

        protected int[] getZInverseTransformationReference()
        Get a reference to the Z inverse transformation matrix.

        BEWARE: the returned value is a reference to an internal array, it is only intended for subclasses use (hence the method is protected and not public). BEWARE: for the MODIFIED LAMBDA METHOD, the returned matrix Z is such that Q = Z'L'DLZ where Q is the covariance matrix and ' refers to the transposition operation

        Returns:
        array of integer corresponding to Z matrix
        Since:
        10.2
      • getSize

        protected int getSize()
        Get the size of the problem. In the ILS problem, the integer returned is the size of the covariance matrix.
        Returns:
        the size of the ILS problem
        Since:
        10.2
      • ltdlDecomposition

        protected abstract void ltdlDecomposition()
        Perform Lᵀ.D.L = Q decomposition of the covariance matrix.
      • reduction

        protected abstract void reduction()
        Perform LAMBDA reduction.
      • discreteSearch

        protected abstract void discreteSearch()
        Find the best solutions to the Integer Least Square problem.
      • inverseDecomposition

        protected abstract void inverseDecomposition()
        Inverse the decomposition.

        This method transforms the Lᵀ.D.L = Q decomposition of covariance into the L⁻¹.D⁻¹.L⁻ᵀ = Q⁻¹ decomposition of the inverse of covariance.

      • integerGaussTransformation

        protected void integerGaussTransformation​(int row,
                                                  int col)
        Perform one integer Gauss transformation.

        This method corresponds to algorithm 2.1 in X.-W Chang, X. Yang and T. Zhou paper.

        Parameters:
        row - row index (counting from 0)
        col - column index (counting from 0)
      • permutation

        protected void permutation​(int k0,
                                   double delta)
        Perform one symmetric permutation involving rows/columns k0 and k0+1.

        This method corresponds to algorithm 2.2 in X.-W Chang, X. Yang and T. Zhou paper.

        Parameters:
        k0 - diagonal index (counting from 0)
        delta - new value for diag[k0+1]
      • recoverAmbiguities

        protected IntegerLeastSquareSolution[] recoverAmbiguities()
        Recover ambiguities prior to the Z-transformation.
        Returns:
        recovered ambiguities
      • lIndex

        protected int lIndex​(int row,
                             int col)
        Get the index of an entry in the lower triangular matrix.
        Parameters:
        row - row index (counting from 0)
        col - column index (counting from 0)
        Returns:
        index in the single dimension array
      • zIndex

        protected int zIndex​(int row,
                             int col)
        Get the index of an entry in the Z transformation matrix.
        Parameters:
        row - row index (counting from 0)
        col - column index (counting from 0)
        Returns:
        index in the single dimension array