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

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

Added original make3d

File size: 671 bytes
Line 
1function F = constraint(X,quantifier,Y)
2% Internal class for constraint list
3
4% Author Johan Löfberg
5% $Id: constraint.m,v 1.5 2005/06/02 13:40:00 joloef Exp $
6
7superiorto('sdpvar');
8superiorto('double');
9
10if isa(X,'blkvar')
11    X = sdpvar(X);
12end
13if isa(Y,'blkvar')
14    Y = sdpvar(Y);
15end
16
17% Try to evaluate
18switch quantifier
19case {'>','>='}
20    Z = X - Y;
21case {'<','<=','=='}
22    Z = Y - X;
23otherwise
24    error('Quantifier not supported')
25end
26
27F.List={X,quantifier,Y};
28F.Evaluated{1} = Z;
29
30switch quantifier
31case {'>','<'}
32    F.strict(1) = 1;
33case {'>=','<=','=='}
34    F.strict(1) = 0;
35otherwise
36    error('Quantifier not supported')
37end
38
39F = class(F,'constraint');
40       
Note: See TracBrowser for help on using the repository browser.