fn compute_constraint_info<
    FI: Sub<Output=FI> + Abs + Ord + Zero + Display + Clone,
    FO: From<FI> + Zero + Ord + Abs + Element + Clone,
>(
    rows: Vec<Row>,
    rhss: Vec<Rhs<FI>>,
    ranges: Vec<Range<FI>>,
) -> Result<(Vec<RangedConstraintRelation<FO>>, DenseVector<FO>), Inconsistency>
where
    for<'r> FO: Add<&'r FO, Output=FO>,
    for<'r> &'r FO: Neg<Output=FO>,
{
    let ranges = compute_ranges(&rhss, ranges, rows.len())?;
    let mut constraint_types = compute_constraint_types(&rows, ranges);
    let b = compute_b(rhss, &mut constraint_types, &rows, rows.len())?;

    Ok((constraint_types, b))
}
/// Convert the constraint related information of a MPS into `GeneralForm` fields.
///
/// # Arguments
///
/// * `rows`: Direction of the constraint (name is not used).
/// * `rhss`: Right-hand sides to be converted into a `b`.
/// * `ranges`: Ranges read (will be flattened, grouping does not matter).
// TODO(ARCHITECTURE): Simplify these trait bounds
Convert the constraint related information of a MPS into `GeneralForm` fields.
Convert the constraint related information of a MPS into ` GeneralForm ` fields .
fn compute_constraint_info<
    FI: Sub<Output=FI> + Abs + Ord + Zero + Display + Clone,
    FO: From<FI> + Zero + Ord + Abs + Element + Clone,
>(
    rows: Vec<Row>,
    rhss: Vec<Rhs<FI>>,
    ranges: Vec<Range<FI>>,
) -> Result<(Vec<RangedConstraintRelation<FO>>, DenseVector<FO>), Inconsistency>
where
    for<'r> FO: Add<&'r FO, Output=FO>,
    for<'r> &'r FO: Neg<Output=FO>,
{
    let ranges = compute_ranges(&rhss, ranges, rows.len())?;
    let mut constraint_types = compute_constraint_types(&rows, ranges);
    let b = compute_b(rhss, &mut constraint_types, &rows, rows.len())?;
    Ok((constraint_types, b))
}
fn compute_constraint_info < FI : Sub < Output = FI > + Abs + Ord + Zero + Display + Clone , FO : From < FI > + Zero + Ord + Abs + Element + Clone , > ( rows : Vec < Row > , rhss : Vec < Rhs < FI > > , ranges : Vec < Range < FI > > , ) -> Result < ( Vec < RangedConstraintRelation < FO > > , DenseVector < FO > ) , Inconsistency > where for < ' r > FO : Add < & ' r FO , Output = FO > , for < ' r > & ' r FO : Neg < Output = FO > , { let ranges = compute_ranges ( & rhss , ranges , rows . len ( ) ) ? ; let mut constraint_types = compute_constraint_types ( & rows , ranges ) ; let b = compute_b ( rhss , & mut constraint_types , & rows , rows . len ( ) ) ? ; Ok ( ( constraint_types , b ) ) }
Convert the constraint related information of a MPS into `GeneralForm` fields.
Convert the constraint related information of a MPS into ` GeneralForm ` fields .
rows
Vec<Row>
rhss
Vec<Rhs<FI>>
ranges
Vec<Range<FI>>
rows
Vec<Row>
rhss
Vec<Rhs<FI>>
ranges
Vec<Range<FI>>