ferromotion_learn/lib.rs
1//! # ferromotion-learn — differentiable, physics-informed learning for physical AI
2//!
3//! Where [`ferromotion_core`] gives you the *physics* — rigid-body dynamics, variational integrators,
4//! contact, estimation — this crate gives you the *learning*: the differentiable machinery for models that
5//! blend physics priors with data. It is the on-device, pure-Rust, WASM-clean counterpart to the
6//! PyTorch-based physics-informed-ML stacks: no BLAS, no Python, no GPU required.
7//!
8//! The organizing idea (from the physics-informed ML literature) is that a physics prior can enter a learned
9//! model at one of three places:
10//! - **guided** — in the *data / features* (engineered inputs, geometric projections);
11//! - **informed** — in the *loss* (penalize violation of a differential equation — a PINN);
12//! - **encoded** — in the *architecture* (Lagrangian/Hamiltonian nets, Neural ODEs, structure-preserving
13//! integrators).
14//!
15//! Everything rests on one keystone: **automatic differentiation**. [`autodiff`] is reverse-mode (for
16//! gradients of a scalar loss w.r.t. many parameters — backpropagation); [`dual`] is forward-mode (for exact
17//! higher-order derivatives w.r.t. a model's *inputs*, which PINNs and Lagrangian nets need). Both are
18//! verified against finite differences.
19
20mod autodiff;
21mod capstone;
22mod delan;
23mod diff_control;
24mod dual;
25pub mod calib;
26pub mod nls;
27mod hnn;
28mod msnn;
29mod neural_ode;
30mod nn;
31mod pinn;
32mod sindy;
33
34pub use autodiff::{Grad, Tape, Var};
35pub use capstone::ModelBasedControl;
36pub use delan::Delan;
37pub use diff_control::PidController;
38pub use dual::{Dual, HyperDual};
39pub use hnn::Hnn;
40pub use msnn::Msnn;
41pub use neural_ode::NeuralOde;
42pub use nn::Mlp;
43pub use pinn::Pinn;
44pub use sindy::{monomial_exponents, Sindy};