summaryrefslogtreecommitdiff
path: root/omega/examples/old_test/chosol.oc-rt
blob: 8fa3b38fd95f8cdc7953c1a387262003d36956f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
>>> T10:={[i] -> [0,i,0,0]};
>>> T20:={[i,j] -> [1,j,0,i]};
>>> T30:={[i] -> [1,i-1,1,0]};
>>> 
>>> Symbolic n;
>>> IS10 := {[i]: 2 <= i <= n};
>>> IS20 := {[i,j]: 2 <= i <= n && 1 <= j <= i-1};
>>> IS30 := IS10;
>>> 
>>> codegen T10:IS10,T20:IS20,T30:IS30;
for(t2 = 2; t2 <= n; t2++) {
  s1(t2);
}
for(t2 = 1; t2 <= n-1; t2++) {
  for(t4 = t2+1; t4 <= n; t4++) {
    s2(t4,t2);
  }
  s3(t2+1);
}

>>> codegen 2 T10:IS10,T20:IS20,T30:IS30;
for(t2 = 2; t2 <= n; t2++) {
  s1(t2);
}
for(t2 = 1; t2 <= n-1; t2++) {
  for(t4 = t2+1; t4 <= n; t4++) {
    s2(t4,t2);
  }
  s3(t2+1);
}