Class CeresSolver2


  • public class CeresSolver2
    extends CeresSolver
    This is a port of the C++ files in ceres-solver-1.14.0 under the BSD license: Ceres Solver - A fast non-linear least squares minimizer Copyright 2015 Google Inc. All rights reserved. http://ceres-solver.org/ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Ceres Solver is an open source C++ library for modeling and solving large, complicated optimization problems. It is a feature rich, mature and performant library which has been used in production at Google since 2010. Ceres Solver can solve two kinds of problems. 1. Non-linear Least Squares problems with bounds constraints. 2. General unconstrained optimization problems. Please see [ceres-solver.org](http://ceres-solver.org/) for more information.
    Author:
    aailb
    • Constructor Detail

      • CeresSolver2

        public CeresSolver2()
    • Method Detail

      • fitToExternalFunction

        public boolean fitToExternalFunction​(double[] x,
                                             double[] residuals,
                                             double[][] jacobian)
        Specified by:
        fitToExternalFunction in class CeresSolver
      • MapValuesToContiguousRange

        public void MapValuesToContiguousRange​(int[] array)
      • norm

        public double norm​(double[] arg)
      • AngleAxisToQuaternion

        public void AngleAxisToQuaternion​(double[] angle_axis,
                                          double[] quaternion)
      • QuaternionToAngleAxis

        public void QuaternionToAngleAxis​(double[] quaternion,
                                          double[] angle_axis)
      • DotProduct

        public double DotProduct​(double[] a,
                                 double[] b)
      • AngleAxisToRotationMatrix

        public void AngleAxisToRotationMatrix​(double[] angle_axis,
                                              double[] R)
      • RotationMatrixToQuaternion

        public void RotationMatrixToQuaternion​(double[] R,
                                               double[] quaternion)
      • RotationMatrixToAngleAxis

        public void RotationMatrixToAngleAxis​(double[] R,
                                              double[] angle_axis)
      • Transpose3x3

        public void Transpose3x3​(double[] m)
      • ToDegrees

        public void ToDegrees​(double[] euler_angles)
      • EulerAnglesToRotationMatrix

        public void EulerAnglesToRotationMatrix​(double[] euler,
                                                double[] R)
      • QuaternionToScaledRotation

        public void QuaternionToScaledRotation​(double[] q,
                                               double[] R)
      • QuaternionToRotation

        public void QuaternionToRotation​(double[] q,
                                         double[] R)
      • UnitQuaternionRotatePoint

        public void UnitQuaternionRotatePoint​(double[] q,
                                              double[] pt,
                                              double[] result)
      • AngleAxisRotatePoint

        public void AngleAxisRotatePoint​(double[] angle_axis,
                                         double[] pt,
                                         double[] result)
      • ComputeVisibility

        public void ComputeVisibility​(CeresSolver.CompressedRowBlockStructure block_structure,
                                      int num_eliminate_blocks,
                                      java.util.Vector<java.util.HashSet<java.lang.Integer>> visibility)
      • CreateSchurComplementGraph

        CeresSolver.WeightedGraph<java.lang.Integer> CreateSchurComplementGraph​(java.util.Vector<java.util.HashSet<java.lang.Integer>> visibility)
      • CubicHermiteSpline

        public void CubicHermiteSpline​(int kDataDimension,
                                       double[] p0,
                                       double[] p1,
                                       double[] p2,
                                       double[] p3,
                                       double x,
                                       double[] f,
                                       double[] dfdx)
      • CompressedColumnScalarMatrixToBlockMatrix

        public void CompressedColumnScalarMatrixToBlockMatrix​(int[] scalar_rows,
                                                              int[] scalar_cols,
                                                              java.util.Vector<java.lang.Integer> row_blocks,
                                                              java.util.Vector<java.lang.Integer> col_blocks,
                                                              java.util.Vector<java.lang.Integer> block_rows,
                                                              java.util.Vector<java.lang.Integer> block_cols)
      • BlockOrderingToScalarOrdering

        public void BlockOrderingToScalarOrdering​(java.util.Vector<java.lang.Integer> blocks,
                                                  java.util.Vector<java.lang.Integer> block_ordering,
                                                  java.util.Vector<java.lang.Integer> scalar_ordering)
      • SolveUpperTriangularInPlace

        public void SolveUpperTriangularInPlace​(int num_cols,
                                                int[] rows,
                                                int[] cols,
                                                double[] values,
                                                double[] rhs_and_solution)
      • SolveUpperTriangularTransposeInPlace

        public void SolveUpperTriangularTransposeInPlace​(int num_cols,
                                                         int[] rows,
                                                         int[] cols,
                                                         double[] values,
                                                         double[] rhs_and_solution)
      • SolveRTRWithSparseRHS

        public void SolveRTRWithSparseRHS​(int num_cols,
                                          int[] rows,
                                          int[] cols,
                                          double[] values,
                                          int rhs_nonzero_index,
                                          double[] solution)
      • AddRandomBlock

        public void AddRandomBlock​(int num_rows,
                                   int num_cols,
                                   int row_block_begin,
                                   int col_block_begin,
                                   java.util.Vector<java.lang.Integer> rows,
                                   java.util.Vector<java.lang.Integer> cols,
                                   java.util.Vector<java.lang.Double> values)
      • FindConnectedComponent

        public <Vertex> Vertex FindConnectedComponent​(Vertex vertex,
                                                      java.util.HashMap<Vertex,​Vertex> union_find)