pub fn new(
        objective: Objective,
        constraints: Sparse<F, F, ColumnMajor>,
        constraint_types: Vec<RangedConstraintRelation<F>>,
        b: DenseVector<F>,
        variables: Vec<Variable<F>>,
        variable_names: Vec<String>,
        fixed_cost: F,
    ) -> Self {
        let nr_active_variables = variables.len();

        let general_form = Self {
            objective,
            constraints,
            constraint_types,
            b,
            fixed_cost,
            variables,
            original_variables: variable_names.into_iter().enumerate()
                .map(|(j, name)| (name, OriginalVariable::Active(j))).collect(),
            from_active_to_original: (0..nr_active_variables).collect(),
        };

        debug_assert!(is_consistent(&general_form));

        general_form
    }
/// Create a new linear program in general form.
///
/// Simple constructor except for two indices that get created.
Create a new linear program in general form.
Simple constructor except for two indices that get created.
Create a new linear program in general form . Simple constructor except for two indices that get created .
pub fn new(
        objective: Objective,
        constraints: Sparse<F, F, ColumnMajor>,
        constraint_types: Vec<RangedConstraintRelation<F>>,
        b: DenseVector<F>,
        variables: Vec<Variable<F>>,
        variable_names: Vec<String>,
        fixed_cost: F,
    ) -> Self {
        let nr_active_variables = variables.len();
        let general_form = Self {
            objective,
            constraints,
            constraint_types,
            b,
            fixed_cost,
            variables,
            original_variables: variable_names.into_iter().enumerate()
                .map(|(j, name)| (name, OriginalVariable::Active(j))).collect(),
            from_active_to_original: (0..nr_active_variables).collect(),
        };
        debug_assert!(is_consistent(&general_form));
        general_form
    }
pub fn new ( objective : Objective , constraints : Sparse < F , F , ColumnMajor > , constraint_types : Vec < RangedConstraintRelation < F > > , b : DenseVector < F > , variables : Vec < Variable < F > > , variable_names : Vec < String > , fixed_cost : F , ) -> Self { let nr_active_variables = variables . len ( ) ; let general_form = Self { objective , constraints , constraint_types , b , fixed_cost , variables , original_variables : variable_names . into_iter ( ) . enumerate ( ) . map ( | ( j , name ) | ( name , OriginalVariable :: Active ( j ) ) ) . collect ( ) , from_active_to_original : ( 0 .. nr_active_variables ) . collect ( ) , } ; debug_assert ! ( is_consistent ( general_form ) ) ; general_form }
Create a new linear program in general form.
Create a new linear program in general form .
objective
Objective
constraints
Sparse<F, F, ColumnMajor>
constraint_types
Vec<RangedConstraintRelation<F>>
b
DenseVector<F>
variables
Vec<Variable<F>>
variable_names
Vec<String>
fixed_cost
F
objective
Objective
constraints
Sparse<F, F, ColumnMajor>
constraint_types
Vec<RangedConstraintRelation<F>>
b
DenseVector<F>
variables
Vec<Variable<F>>
variable_names
Vec<String>
fixed_cost
F