@@ -401,7 +401,7 @@ PYBIND11_MODULE(swig_helper, m) {
401
401
PyExc_ValueError,
402
402
" The number of expressions and coefficients must match." );
403
403
}
404
- return LinearExpr::WeightedSumDouble (exprs, coeffs);
404
+ return LinearExpr::WeightedSumFloat (exprs, coeffs);
405
405
},
406
406
py::return_value_policy::automatic, py::keep_alive<0 , 1 >())
407
407
.def_static (
@@ -425,27 +425,27 @@ PYBIND11_MODULE(swig_helper, m) {
425
425
PyExc_ValueError,
426
426
" The number of expressions and coefficients must match." );
427
427
}
428
- return LinearExpr::MixedWeightedSumDouble (exprs, coeffs);
428
+ return LinearExpr::MixedWeightedSumFloat (exprs, coeffs);
429
429
},
430
430
py::return_value_policy::automatic, py::keep_alive<0 , 1 >())
431
431
// Make sure to keep the order of the overloads: int before float as an
432
432
// an integer value will be silently converted to a float.
433
433
.def_static (" term" , &LinearExpr::TermInt, arg (" expr" ).none (false ),
434
434
arg (" coeff" ), " Returns expr * coeff." ,
435
435
py::return_value_policy::automatic, py::keep_alive<0 , 1 >())
436
- .def_static (" term" , &LinearExpr::TermDouble , arg (" expr" ).none (false ),
436
+ .def_static (" term" , &LinearExpr::TermFloat , arg (" expr" ).none (false ),
437
437
arg (" coeff" ), " Returns expr * coeff." ,
438
438
py::return_value_policy::automatic, py::keep_alive<0 , 1 >())
439
439
.def_static (" affine" , &LinearExpr::AffineInt, arg (" expr" ).none (false ),
440
440
arg (" coeff" ), arg (" offset" ), " Returns expr * coeff + offset." ,
441
441
py::return_value_policy::automatic, py::keep_alive<0 , 1 >())
442
- .def_static (" affine" , &LinearExpr::AffineDouble , arg (" expr" ).none (false ),
442
+ .def_static (" affine" , &LinearExpr::AffineFloat , arg (" expr" ).none (false ),
443
443
arg (" coeff" ), arg (" offset" ), " Returns expr * coeff + offset." ,
444
444
py::return_value_policy::automatic, py::keep_alive<0 , 1 >())
445
445
.def_static (" constant" , &LinearExpr::ConstantInt, arg (" value" ),
446
446
" Returns a constant linear expression." ,
447
447
py::return_value_policy::automatic)
448
- .def_static (" constant" , &LinearExpr::ConstantDouble , arg (" value" ),
448
+ .def_static (" constant" , &LinearExpr::ConstantFloat , arg (" value" ),
449
449
" Returns a constant linear expression." ,
450
450
py::return_value_policy::automatic)
451
451
// Pre PEP8 compatibility layer.
@@ -474,13 +474,13 @@ PYBIND11_MODULE(swig_helper, m) {
474
474
PyExc_ValueError,
475
475
" The number of expressions and coefficients must match." );
476
476
}
477
- return LinearExpr::MixedWeightedSumDouble (exprs, coeffs);
477
+ return LinearExpr::MixedWeightedSumFloat (exprs, coeffs);
478
478
},
479
479
py::return_value_policy::automatic, py::keep_alive<0 , 1 >())
480
480
.def_static (" Term" , &LinearExpr::TermInt, arg (" expr" ).none (false ),
481
481
arg (" coeff" ), " Returns expr * coeff." ,
482
482
py::return_value_policy::automatic, py::keep_alive<0 , 1 >())
483
- .def_static (" Term" , &LinearExpr::TermDouble , arg (" expr" ).none (false ),
483
+ .def_static (" Term" , &LinearExpr::TermFloat , arg (" expr" ).none (false ),
484
484
arg (" coeff" ), " Returns expr * coeff." ,
485
485
py::return_value_policy::automatic, py::keep_alive<0 , 1 >())
486
486
// Methods.
@@ -495,30 +495,30 @@ PYBIND11_MODULE(swig_helper, m) {
495
495
py::keep_alive<0 , 2 >())
496
496
.def (" __add__" , &LinearExpr::AddInt, arg (" cst" ),
497
497
py::return_value_policy::automatic, py::keep_alive<0 , 1 >())
498
- .def (" __add__" , &LinearExpr::AddDouble , arg (" cst" ),
498
+ .def (" __add__" , &LinearExpr::AddFloat , arg (" cst" ),
499
499
py::return_value_policy::automatic, py::keep_alive<0 , 1 >())
500
500
.def (" __radd__" , &LinearExpr::AddInt, arg (" cst" ),
501
501
py::return_value_policy::automatic, py::keep_alive<0 , 1 >())
502
- .def (" __radd__" , &LinearExpr::AddDouble , arg (" cst" ),
502
+ .def (" __radd__" , &LinearExpr::AddFloat , arg (" cst" ),
503
503
py::return_value_policy::automatic, py::keep_alive<0 , 1 >())
504
504
.def (" __sub__" , &LinearExpr::Sub, arg (" other" ).none (false ),
505
505
py::return_value_policy::automatic, py::keep_alive<0 , 1 >(),
506
506
py::keep_alive<0 , 2 >())
507
507
.def (" __sub__" , &LinearExpr::SubInt, arg (" cst" ),
508
508
py::return_value_policy::automatic, py::keep_alive<0 , 1 >())
509
- .def (" __sub__" , &LinearExpr::SubDouble , arg (" cst" ),
509
+ .def (" __sub__" , &LinearExpr::SubFloat , arg (" cst" ),
510
510
py::return_value_policy::automatic, py::keep_alive<0 , 1 >())
511
511
.def (" __rsub__" , &LinearExpr::RSubInt, arg (" cst" ),
512
512
py::return_value_policy::automatic, py::keep_alive<0 , 1 >())
513
- .def (" __rsub__" , &LinearExpr::RSubDouble , arg (" cst" ),
513
+ .def (" __rsub__" , &LinearExpr::RSubFloat , arg (" cst" ),
514
514
py::return_value_policy::automatic, py::keep_alive<0 , 1 >())
515
515
.def (" __mul__" , &LinearExpr::MulInt, arg (" cst" ),
516
516
py::return_value_policy::automatic, py::keep_alive<0 , 1 >())
517
- .def (" __mul__" , &LinearExpr::MulDouble , arg (" cst" ),
517
+ .def (" __mul__" , &LinearExpr::MulFloat , arg (" cst" ),
518
518
py::return_value_policy::automatic, py::keep_alive<0 , 1 >())
519
519
.def (" __rmul__" , &LinearExpr::MulInt, arg (" cst" ),
520
520
py::return_value_policy::automatic, py::keep_alive<0 , 1 >())
521
- .def (" __rmul__" , &LinearExpr::MulDouble , arg (" cst" ),
521
+ .def (" __rmul__" , &LinearExpr::MulFloat , arg (" cst" ),
522
522
py::return_value_policy::automatic, py::keep_alive<0 , 1 >())
523
523
.def (" __neg__" , &LinearExpr::Neg, py::return_value_policy::automatic,
524
524
py::keep_alive<0 , 1 >())
@@ -724,7 +724,7 @@ PYBIND11_MODULE(swig_helper, m) {
724
724
This method implements the logical negation of a Boolean variable.
725
725
It is only valid if the variable has a Boolean domain (0 or 1).
726
726
727
- Note that this method is nilpotent: `x.negated().negated() == x`.
727
+ Note that this method is nilpotent: `x.negated().negated() == x`.
728
728
)doc" )
729
729
.def (" __invert__" , &Literal::negated,
730
730
" Returns the negation of the current literal." )
0 commit comments