Skip to content

Commit 9128fe4

Browse files
committed
Trying it out
1 parent 41dfc2d commit 9128fe4

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

development/dual_basic_vector.jl

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using SimplexTableaux, LinearAlgebraX
2+
3+
function dual_basic_vector(T::Tableau, B)
4+
A = T.A
5+
c = T.c
6+
A_B = A[:, B]
7+
c_B = c[B]
8+
yT = c_B' * invx(A_B)
9+
return yT'
10+
end
11+
12+
function dual_basic_vector(T::Tableau)
13+
B = get_basis(T)
14+
if 0 B
15+
error("No basis set for this tableau")
16+
end
17+
return dual_basic_vector(T, B)
18+
end

0 commit comments

Comments
 (0)