Crates.io | ceres-solver |
lib.rs | ceres-solver |
version | 0.3.0 |
source | src |
created_at | 2023-01-19 20:23:48.117721 |
updated_at | 2024-02-26 16:14:14.898781 |
description | Safe Rust bindings for the Ceres Solver |
homepage | |
repository | https://github.com/light-curve/ceres-solver-rs |
max_upload_size | |
id | 762900 |
size | 110,668 |
ceres-solver-rs
cargo add ceres-solver --features=source
Ceres Solver is a C++ library for large optimization problems. It can be used to solve Non-linear Least Squares problems with constraints and general optimization problems. Here we provide a Rust binding for this library.
The earliest Ceres Solver version tested is 2.0, but the bindings may work with older versions
This project consists of three crates:
ceres-solver
is a safe Rust bindingsceres-solver-sys
is an unsafe Rust bindings written with the usage of cxx
ceres-solver-src
is an optional no-code crate to build and distribute a minimal static Ceres Solver libraryTo build Ceres Solver statically and link it to your project, use source
Cargo feature, which would add ceres-solver-src
dependency into your project.
Another Cargo feature is v2_1
, which should be used when linked with Ceres Solver 2.1 or newer.
Current implementation of the binding is not complete. The following list shows the status of the binding support:
Problem
- basic class for NLLS, supports adding residual blocks, setting boundary conditions, marking parameter blocks to be constant/variable, and solving the problemCostFunction
- user provides both residual and JacobianSizedCostFunction
- same but with the residual vector shape is known at compile timeAutoDiffCostFunction
- user provides residual and Jacobian is computed by automatic differentiationDynamicAutoDiffCostFunction
- same but with the residual vector shape is unknown at compile timeNumericDiffCostFunction
- user provides residual and Jacobian is computed by numerical differentiationCostFunctionToFunctor
and DynamicCostFunctionToFunctor
- adapter to use CostFunction
as a mix of all other cost functionsConditionedCostFunction
- adapter to use CostFunction
with different conditioningGradientChecker
- helper class to check the correctness of the JacobianNormalPrior
- changes a cost function to use a covariance matrix instead of a simple scalar productLossFunction
- a function applied to the squared norm of the residual vector, both custom and Ceres stack loss functions are supportedManifold
, AutoDiffManifold
EvaluationCallback
Solver
class itself is not implemented, but the following nested classes are supported:
Solver::Options
Solver::Summary
Please don't hesitate to create an issue to request prioritization of any functionality that may have been prioritized.