Class CeresSolver2

java.lang.Object
gov.nih.mipav.model.algorithms.CeresSolver
gov.nih.mipav.model.algorithms.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 Details

    • CeresSolver2

      public CeresSolver2()
  • Method Details

    • 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, Vector<HashSet<Integer>> visibility)
    • CreateSchurComplementGraph

      CeresSolver.WeightedGraph<Integer> CreateSchurComplementGraph(Vector<HashSet<Integer>> visibility)
    • CubicHermiteSpline

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

      public void ComputeCanonicalViewsClustering(CeresSolver2.CanonicalViewsClusteringOptions options, CeresSolver.WeightedGraph<Integer> graph, Vector<Integer> centers, HashMap<Integer,Integer> membership)
    • CompressedColumnScalarMatrixToBlockMatrix

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

      public void BlockOrderingToScalarOrdering(Vector<Integer> blocks, Vector<Integer> block_ordering, Vector<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, Vector<Integer> rows, Vector<Integer> cols, Vector<Double> values)
    • FromTripletSparseMatrix

    • FromTripletSparseMatrixTransposed

      public CeresSolver.CompressedRowSparseMatrix FromTripletSparseMatrixTransposed(CeresSolver.TripletSparseMatrix input)
    • FromTripletSparseMatrix

      public CeresSolver.CompressedRowSparseMatrix FromTripletSparseMatrix(CeresSolver.TripletSparseMatrix input, boolean transpose)
    • CreateBlockDiagonalMatrix

      public CeresSolver.CompressedRowSparseMatrix CreateBlockDiagonalMatrix(double[] diagonal, Vector<Integer> blocks)
    • CreateRandomMatrix

    • FindConnectedComponent

      public <Vertex> Vertex FindConnectedComponent(Vertex vertex, HashMap<Vertex,Vertex> union_find)
    • ComputeSingleLinkageClustering

      public int ComputeSingleLinkageClustering(CeresSolver2.SingleLinkageClusteringOptions options, CeresSolver.WeightedGraph<Integer> graph, HashMap<Integer,Integer> membership)
    • Degree2MaximumSpanningForest

      public CeresSolver.WeightedGraph<Integer> Degree2MaximumSpanningForest(CeresSolver.WeightedGraph<Integer> graph)