Line | |
---|
1 | function F = lt(X,Y) |
---|
2 | % Internal class for constraint lists |
---|
3 | |
---|
4 | % Author Johan Löfberg |
---|
5 | % $Id: lt.m,v 1.1 2004/06/17 08:40:02 johanl Exp $ |
---|
6 | |
---|
7 | superiorto('sdpvar'); |
---|
8 | superiorto('double'); |
---|
9 | |
---|
10 | % Try to evaluate |
---|
11 | try |
---|
12 | if isa(X,'constraint') |
---|
13 | % (z > w) < y |
---|
14 | Z = Y - X.List{end}; |
---|
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 | % x < (w > y) |
---|
22 | Z = Y.List{1} - X; |
---|
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 | |
---|
32 | |
---|
33 | |
---|
Note: See
TracBrowser
for help on using the repository browser.