Rev | Line | |
---|
[37] | 1 | function F = gt(X,Y) |
---|
| 2 | % Internal class for constraint lists |
---|
| 3 | |
---|
| 4 | % Author Johan Löfberg |
---|
| 5 | % $Id: gt.m,v 1.1 2004/06/17 08:40:02 johanl Exp $ |
---|
| 6 | |
---|
| 7 | superiorto('sdpvar'); |
---|
| 8 | superiorto('double'); |
---|
| 9 | |
---|
| 10 | try |
---|
| 11 | % Try to evaluate |
---|
| 12 | if isa(X,'constraint') |
---|
| 13 | % (z > w) > y |
---|
| 14 | Z = X.List{end} - Y; |
---|
| 15 | F = X; |
---|
| 16 | F.List{end+1} = '>'; |
---|
| 17 | F.List{end+1} = Y; |
---|
| 18 | F.Evaluated{end+1} = Z; |
---|
| 19 | F.strict(end+1) = 1; |
---|
| 20 | else |
---|
| 21 | % z > (w > y) |
---|
| 22 | Z = X - Y.List{1}; |
---|
| 23 | F = Y; |
---|
| 24 | F.List = {X,'>',F.List{:}}; |
---|
| 25 | F.Evaluated = {Z,F.Evaluated{:}}; |
---|
| 26 | F.strict = [1 F.strict]; |
---|
| 27 | end |
---|
| 28 | catch |
---|
| 29 | error(lasterr); |
---|
| 30 | end |
---|
| 31 | |
---|
Note: See
TracBrowser
for help on using the repository browser.