apex_solver/lib.rs
1//! # Apex Solver
2//!
3//! A comprehensive Rust library for nonlinear least squares optimization, specifically designed
4//! for computer vision applications such as bundle adjustment, graph-based pose optimization, and SLAM.
5//!
6//! ## Features
7//!
8//! - **Multiple Optimization Algorithms**: Gauss-Newton, Levenberg-Marquardt, and Dog Leg solvers
9//! - **Flexible Linear Algebra Backend**: Support for both Sparse Cholesky and Sparse QR decomposition
10//! - **Configurable Solver System**: Easy-to-use configuration system for algorithm and backend selection
11//! - **High Performance**: Built on the faer linear algebra library for optimal performance
12//! - **Comprehensive Testing**: Extensive test suite ensuring correctness and reliability
13//!
14//!
15//! ## Solver Types
16//!
17//! - **Gauss-Newton**: Fast convergence for well-conditioned problems
18//! - **Levenberg-Marquardt**: Robust algorithm with adaptive damping
19//! - **Dog Leg**: Trust region method combining Gauss-Newton and steepest descent
20//!
21//! ## Linear Algebra Backends
22//!
23//! - **Sparse Cholesky**: Efficient for positive definite systems
24//! - **Sparse QR**: More robust for rank-deficient or ill-conditioned systems
25
26pub mod core;
27pub mod error;
28pub mod factors;
29pub mod io;
30pub mod linalg;
31pub mod logger;
32pub mod manifold;
33pub mod observers;
34pub mod optimizer;
35
36// Re-export core types
37pub use core::variable::Variable;
38pub use error::{ApexSolverError, ApexSolverResult};
39
40// Re-export factor types
41
42pub use factors::{BetweenFactor, Factor, PriorFactor, ProjectionFactor};
43
44// Re-export new unified camera module types
45
46pub use factors::camera::{
47 BundleAdjustment, CameraModel, DoubleSphereCamera, EucmCamera, FovCamera, KannalaBrandtCamera,
48 LandmarksAndIntrinsics, OnlyIntrinsics, OnlyLandmarks, OnlyPose, OptimizeParams, PinholeCamera,
49 PoseAndIntrinsics, RadTanCamera, SelfCalibration, UcmCamera,
50};
51
52pub use linalg::{LinearSolverType, SparseCholeskySolver, SparseLinearSolver, SparseQRSolver};
53pub use logger::{init_logger, init_logger_with_level};
54pub use optimizer::{
55 LevenbergMarquardt, OptObserver, OptObserverVec, OptimizerType, Solver,
56 levenberg_marquardt::LevenbergMarquardtConfig,
57};
58
59#[cfg(feature = "visualization")]
60pub use observers::{RerunObserver, VisualizationConfig};