Rev | Line | |
---|
[37] | 1 | function itslinear=islinear(F) |
---|
| 2 | %ISLINEAR Check if all constraints are linear |
---|
| 3 | % |
---|
| 4 | % p = islinear(F) |
---|
| 5 | % |
---|
| 6 | % F : SET object |
---|
| 7 | % p : boolean 0/1 |
---|
| 8 | |
---|
| 9 | % Author Johan Löfberg |
---|
| 10 | % $Id: islinear.m,v 1.3 2005/02/04 10:10:26 johanl Exp $ |
---|
| 11 | |
---|
| 12 | [monomtable,variabletype] = yalmip('monomtable'); |
---|
| 13 | itslinear = 1; |
---|
| 14 | i = 1; |
---|
| 15 | while itslinear & (i<=length(F.clauses)) |
---|
| 16 | Fi = F.clauses{i}; |
---|
| 17 | xvars = getvariables(Fi.data); |
---|
| 18 | itslinear = itslinear & ~any(variabletype(xvars)); |
---|
| 19 | i = i + 1; |
---|
| 20 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.