pub struct LinearConstraints {
pub matrix: Matrix,
pub rhs: Vec<f64>,
}Expand description
A block of constraints matrix * x = rhs or matrix * x <= rhs.
Fields§
§matrix: MatrixConstraint matrix.
rhs: Vec<f64>Right-hand side.
Implementations§
Source§impl LinearConstraints
impl LinearConstraints
Sourcepub fn new(
matrix: Matrix,
rhs: Vec<f64>,
) -> Result<LinearConstraints, ProblemError>
pub fn new( matrix: Matrix, rhs: Vec<f64>, ) -> Result<LinearConstraints, ProblemError>
Creates a validated constraint block.
§Errors
Returns ProblemError::Dimension if row and RHS counts differ.
Sourcepub fn empty(dimension: usize) -> LinearConstraints
pub fn empty(dimension: usize) -> LinearConstraints
An empty block with the requested decision dimension.
Trait Implementations§
Source§impl Clone for LinearConstraints
impl Clone for LinearConstraints
Source§fn clone(&self) -> LinearConstraints
fn clone(&self) -> LinearConstraints
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LinearConstraints
impl Debug for LinearConstraints
Source§impl PartialEq for LinearConstraints
impl PartialEq for LinearConstraints
impl StructuralPartialEq for LinearConstraints
Auto Trait Implementations§
impl Freeze for LinearConstraints
impl RefUnwindSafe for LinearConstraints
impl Send for LinearConstraints
impl Sync for LinearConstraints
impl Unpin for LinearConstraints
impl UnsafeUnpin for LinearConstraints
impl UnwindSafe for LinearConstraints
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