1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//! Linear programming via the revised simplex method.
//!
//! Solves problems of the form:
//!
//! ```text
//! minimize c^T x
//! subject to A_ub x <= b_ub
//! x >= 0
//! ```
pub use linprog;
use Float;
/// Result of a linear programming solve.
///
/// # Examples
///
/// ```
/// # use scivex_optim::linprog::linprog;
/// // minimize -x - 2y s.t. x + y <= 4, x >= 0, y >= 0
/// let result = linprog(&[-1.0_f64, -2.0], &[vec![1.0, 1.0]], &[4.0]).unwrap();
/// assert!(result.converged);
/// ```