Line | |
---|
1 | function [F,changed] = convertlorentz(F) |
---|
2 | %catsdp Internal function: converts rotated Lorentz to SOCC |
---|
3 | |
---|
4 | % Author Johan Löfberg |
---|
5 | % $Id: convertlorentz.m,v 1.4 2005/09/23 13:05:00 joloef Exp $ |
---|
6 | |
---|
7 | changed = 0; |
---|
8 | Counter = size(F.clauses,2); |
---|
9 | for i = 1:Counter |
---|
10 | % Yep, Lorentz |
---|
11 | if (F.clauses{i}.type==5) |
---|
12 | changed=1; |
---|
13 | xyz = F.clauses{i}.data; |
---|
14 | x = xyz(1); |
---|
15 | y = xyz(2); |
---|
16 | z = xyz(3:end); |
---|
17 | F.clauses{i}.data = [(x+y)/sqrt(2);(x-y)/sqrt(2);z]; |
---|
18 | F.clauses{i}.type = 4; |
---|
19 | end |
---|
20 | end |
---|
21 | |
---|
Note: See
TracBrowser
for help on using the repository browser.