cddlib-rs
Safe Rust bindings over cddlib-sys. Wraps cddlib's double-description
routines for convex polyhedra without exposing raw pointers.
Features
- Safe wrappers: Matrices, polyhedra, and LP solutions with RAII lifetime management.
- Multiple backends:
f64,CddFloat,CddRational---selectable via generics. - Familiar API: Compute facets, generators, and widths using standard Rust types.
Example
use ;
let verts = vec!;
// Inferred scalar type (`f64` here).
let poly = from_vertex_rows?;
// Convert to exact rationals.
let m_f64 = from_vertex_rows?;
let m_rat: = m_f64.convert?;
let poly_exact = from_generators_matrix?;
let facets = poly_exact.facets?;
All backends enabled by default. Matrix and Polyhedron default to f64.
License
AGPL-3.0-only. See LICENSE for details.