pub struct PolyhedralDomain {
pub n: usize,
pub constraints: Vec<(Vec<f64>, f64)>,
}Expand description
A lightweight polyhedral domain element: a set of linear inequalities.
Fields§
§n: usizeNumber of variables
constraints: Vec<(Vec<f64>, f64)>Constraints: each is (coefficients, rhs) meaning sum(a_i * x_i) ≤ b
Implementations§
Source§impl PolyhedralDomain
impl PolyhedralDomain
Sourcepub fn add_constraint(&mut self, coeffs: Vec<f64>, rhs: f64)
pub fn add_constraint(&mut self, coeffs: Vec<f64>, rhs: f64)
Add a constraint: coeffs · x ≤ rhs.
Sourcepub fn num_constraints(&self) -> usize
pub fn num_constraints(&self) -> usize
Number of constraints.
Auto Trait Implementations§
impl Freeze for PolyhedralDomain
impl RefUnwindSafe for PolyhedralDomain
impl Send for PolyhedralDomain
impl Sync for PolyhedralDomain
impl Unpin for PolyhedralDomain
impl UnsafeUnpin for PolyhedralDomain
impl UnwindSafe for PolyhedralDomain
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more