source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/opt/yalmip/extras/@lmi/set.m @ 37

Last change on this file since 37 was 37, checked in by (none), 14 years ago

Added original make3d

File size: 2.0 KB
Line 
1function F = set(F,tag)
2%set               Defines a constraint (the feasible set)
3%   
4%    F = SET([])           Creates an empty SET-object
5%    F = SET(X > Y)        Constrains X-Y to be positive semi-definite if X-Y is Hermitian,
6%                          interpreted as element-wise constraint otherwise
7%    F = SET(X==Y)         Element-wise equality constraint
8%    F = SET(CONE(X,Y))    Second order cone constraint ||X||<Y (X and Y column vectors)
9%
10%  Constraints can also be generated using string notation (displays nicely with syntax high-lightning)
11%    F = SET('X>Y')        Constrains X-Y to be positive semi-definite if X-Y is Hermitian,
12%                          interpreted as element-wise constraint otherwise
13%    F = SET('X==Y')       Element-wise equality constraint 
14%    F = SET('||X||<Y')    Create second order cone constraint (X and Y column vectors)
15%
16%  One can also use overloaded >, < and ==
17%
18%  Variables can be constrained to be integer or binary
19%    F = SET(INTEGER(X))
20%    F = SET(BINARY(X))
21%
22%  Multiple constraints are obtained with overloaded plus
23%    F = set(X > 0) + set(CONE(X(:),1)) + SET(X(1,1) == 1/2)
24%
25%  Double-sided constraint (and extensions) can easily be defined
26%  The following two comands give equivalent problems
27%    F = set(X > 0 > Y > Z < 5 < W)
28%    F = set(X > 0) + set(0 > Y) + set(Y > Z) + set(Z < 5) + set(5 < W)
29%
30%  A constraint can be tagged with a name or description
31%    F = SET(X > Y,'tag')  Gives the constraint a tag (used in display/checkset) 
32%
33%  General info
34%
35%    The right-hand side and left-hand side can be interchanged. Supports {>,<,>=,<=,==}.
36%    See FAQ for information on strict vs. non-strict inequalities.
37%
38%    Any valid expression built using DOUBLEs & SDPVARs can be used on both sides.
39%
40%    The advantage of using the string notation approach is that more information will be 
41%    shown when the SET is displayed (and in checkset)
42%
43%    See also   DUAL, SOLVESDP, INTEGER, BINARY
44if nargin == 2
45    for i = 1:length(F.clauses)
46        F.clauses{i}.handle = tag;
47    end
48end
Note: See TracBrowser for help on using the repository browser.