pub fn general_form() -> GeneralForm<T> {
    let data = vec![
        vec![1, 1, 0],
        vec![1, 0, 1],
        vec![0, -1, 1],
    ];
    let rows = ColumnMajor::from_test_data(&data, 3);

    let constraints = vec![
        RangedConstraintRelation::Less,
        RangedConstraintRelation::Greater,
        RangedConstraintRelation::Equal,
    ];

    let b = DenseVector::from_test_data(vec![
        5,
        10,
        7,
    ]);

    let variables = vec![
        GeneralFormVariable {
            variable_type: VariableType::Continuous,
            cost: R64!(1),
            lower_bound: Some(R64!(0)),
            upper_bound: Some(R64!(4)),
            shift: R64!(0),
            flipped: false
        },
        GeneralFormVariable {
            variable_type: VariableType::Integer,
            cost: R64!(4),
            lower_bound: Some(R64!(-1)),
            upper_bound: Some(R64!(1)),
            shift: R64!(0),
            flipped: false
        },
        GeneralFormVariable {
            variable_type: VariableType::Continuous,
            cost: R64!(9),
            lower_bound: Some(R64!(0)),
            upper_bound: None,
            shift: R64!(0),
            flipped: false
        },
    ];
    let variable_names = vec!["XONE".to_string(), "YTWO".to_string(), "ZTHREE".to_string()];

    GeneralForm::new(
        Objective::Minimize,
        rows,
        constraints,
        b,
        variables,
        variable_names,
        R64!(0),
    )
}
/// The linear program in expected `GeneralForm`.
The linear program in expected `GeneralForm`.
The linear program in expected ` GeneralForm ` .
pub fn general_form() -> GeneralForm<T> {
    let data = vec![
        vec![1, 1, 0],
        vec![1, 0, 1],
        vec![0, -1, 1],
    ];
    let rows = ColumnMajor::from_test_data(&data, 3);
    let constraints = vec![
        RangedConstraintRelation::Less,
        RangedConstraintRelation::Greater,
        RangedConstraintRelation::Equal,
    ];
    let b = DenseVector::from_test_data(vec![
        5,
        10,
        7,
    ]);
    let variables = vec![
        GeneralFormVariable {
            variable_type: VariableType::Continuous,
            cost: R64!(1),
            lower_bound: Some(R64!(0)),
            upper_bound: Some(R64!(4)),
            shift: R64!(0),
            flipped: false
        },
        GeneralFormVariable {
            variable_type: VariableType::Integer,
            cost: R64!(4),
            lower_bound: Some(R64!(-1)),
            upper_bound: Some(R64!(1)),
            shift: R64!(0),
            flipped: false
        },
        GeneralFormVariable {
            variable_type: VariableType::Continuous,
            cost: R64!(9),
            lower_bound: Some(R64!(0)),
            upper_bound: None,
            shift: R64!(0),
            flipped: false
        },
    ];
    let variable_names = vec!["XONE".to_string(), "YTWO".to_string(), "ZTHREE".to_string()];
    GeneralForm::new(
        Objective::Minimize,
        rows,
        constraints,
        b,
        variables,
        variable_names,
        R64!(0),
    )
}
pub fn general_form ( ) -> GeneralForm < T > { let data = vec ! [ vec [ 1 1 0 ] vec [ 1 0 1 ] vec [ 0 1 1 ] ] ; let rows = ColumnMajor :: from_test_data ( & data , 3 ) ; let constraints = vec ! [ RangedConstraintRelation Less RangedConstraintRelation Greater RangedConstraintRelation Equal ] ; let b = DenseVector :: from_test_data ( vec ! [ 5 10 7 ] ) ; let variables = vec ! [ GeneralFormVariable { variable_type VariableType Continuous cost R64 ( 1 ) lower_bound Some ( R64 ( 0 ) ) upper_bound Some ( R64 ( 4 ) ) shift R64 ( 0 ) flipped false } GeneralFormVariable { variable_type VariableType Integer cost R64 ( 4 ) lower_bound Some ( R64 ( 1 ) ) upper_bound Some ( R64 ( 1 ) ) shift R64 ( 0 ) flipped false } GeneralFormVariable { variable_type VariableType Continuous cost R64 ( 9 ) lower_bound Some ( R64 ( 0 ) ) upper_bound None shift R64 ( 0 ) flipped false } ] ; let variable_names = vec ! [ " " to_string ( ) " " to_string ( ) " " to_string ( ) ] ; GeneralForm :: new ( Objective :: Minimize , rows , constraints , b , variables , variable_names , R64 ! ( 0 ) , ) }
The linear program in expected `GeneralForm`.
The linear program in expected ` GeneralForm ` .