Skip to main content

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;
27pub mod smoothed;
28mod hnn;
29mod msnn;
30mod neural_ode;
31mod nn;
32mod pinn;
33mod sindy;
34
35pub use autodiff::{Grad, Tape, Var};
36pub use capstone::ModelBasedControl;
37pub use delan::Delan;
38pub use diff_control::PidController;
39pub use dual::{Dual, HyperDual};
40pub use hnn::Hnn;
41pub use msnn::Msnn;
42pub use neural_ode::NeuralOde;
43pub use nn::Mlp;
44pub use pinn::Pinn;
45pub use sindy::{monomial_exponents, Sindy};