Mercurial > defical
annotate defical-sharp/libsemtd/print.cs @ 0:ebed2bd0d300
Initial import from svn. History be damned.
author | Edho P. Arief <me@myconan.net> |
---|---|
date | Fri, 02 Apr 2010 23:11:57 +0700 |
parents | |
children |
rev | line source |
---|---|
0
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
1 namespace libsemtd |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
2 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
3 public partial class Semtd |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
4 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
5 private string sep = " | "; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
6 private string print(int mode) |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
7 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
8 return printBasic() + sep + |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
9 printMagicNum(mode) + sep + |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
10 printLabels(mode) + sep + |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
11 printDef(mode) + sep + |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
12 printMisc(mode); |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
13 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
14 private string printBasic() |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
15 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
16 string ret = ""; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
17 ret += "graph: " + this.graphType + |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
18 sep + |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
19 "edges: " + this.numEdges.ToString() + |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
20 sep + |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
21 "vertices: " + this.numVerMain.ToString() + |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
22 sep + |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
23 "deficiencies: " + this.numVerDef.ToString(); |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
24 return ret; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
25 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
26 private string printMagicNum(int mode) |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
27 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
28 string ret = ""; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
29 int edgeWeight, edgeLabel; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
30 edgeLabel = edgeWeight = 0; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
31 for (int i = 1; i <= this.labelEdgeAbsoluteMax; i++) |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
32 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
33 if (this.labelEdgesUsed[i] > 0) |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
34 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
35 edgeWeight = i; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
36 edgeLabel = this.numEdges + this.numVerTotal; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
37 break; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
38 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
39 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
40 if (mode == 1) |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
41 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
42 edgeWeight = 2 * (this.numVerTotal) + 2 - edgeWeight; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
43 edgeLabel = 2 * this.numVerTotal + this.numEdges + 1 - edgeLabel; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
44 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
45 ret += "mnum: " + (edgeWeight + edgeLabel).ToString(); |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
46 return ret; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
47 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
48 private string printLabels(int mode) |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
49 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
50 string ret = ""; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
51 int[] myLabelVer = new int[this.NumVerMain]; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
52 for (int i = 0; i < this.NumVerMain; i++) |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
53 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
54 if (mode == 1) |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
55 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
56 myLabelVer[i] = this.numVerTotal + 1 - this.labelVer[i]; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
57 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
58 else |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
59 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
60 myLabelVer[i] = this.labelVer[i]; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
61 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
62 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
63 if (this.graphType == "doublefan" && myLabelVer[0] > myLabelVer[1]) |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
64 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
65 int temp = myLabelVer[0]; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
66 myLabelVer[0] = myLabelVer[1]; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
67 myLabelVer[1] = temp; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
68 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
69 int startPath=0; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
70 int endPath=0; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
71 switch (graphType) |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
72 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
73 case "fan": |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
74 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
75 startPath = 1; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
76 endPath=this.numVerMain-1; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
77 break; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
78 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
79 case "doublefan": |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
80 case "wheel": |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
81 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
82 startPath = 2; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
83 endPath=this.numVerMain-1; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
84 break; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
85 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
86 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
87 if (startPath > 0 && myLabelVer[startPath] > myLabelVer[endPath]) |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
88 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
89 int a = startPath, b = endPath; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
90 while (a < b) |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
91 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
92 int temp = myLabelVer[a]; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
93 myLabelVer[a] = myLabelVer[b]; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
94 myLabelVer[b] = temp; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
95 a++; b--; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
96 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
97 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
98 for (int i = 0; i < this.numVerMain; i++) |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
99 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
100 int myLabel=myLabelVer[i]; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
101 if (i == 0) |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
102 switch (graphType) |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
103 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
104 case "wheel": |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
105 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
106 ret += "c: " + myLabel.ToString() |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
107 + sep |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
108 + "l: "; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
109 break; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
110 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
111 case "fan": |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
112 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
113 ret += "c: " + myLabel.ToString() |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
114 + sep |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
115 + "p: "; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
116 break; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
117 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
118 case "doublefan": |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
119 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
120 ret += "c: " + myLabel.ToString() + ","; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
121 break; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
122 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
123 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
124 else if (i == 1 && this.graphType == "doublefan") |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
125 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
126 ret += myLabel.ToString() |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
127 + sep |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
128 + "p: "; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
129 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
130 else if (i == this.numVerMain-1) |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
131 ret += myLabel.ToString(); |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
132 else |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
133 ret += myLabel.ToString() + ","; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
134 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
135 return ret; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
136 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
137 private string printDef(int mode) |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
138 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
139 string ret = ""; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
140 if (this.numVerDef > 0) |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
141 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
142 ret += "def: "; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
143 bool[] labelVerUsed = new bool[this.numVerTotal + 1]; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
144 for (int i = 0; i < this.numVerMain; i++) |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
145 labelVerUsed[this.labelVer[i]] = true; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
146 int amountDef = 0; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
147 for (int i = 1; i <= this.numVerTotal; i++) |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
148 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
149 int myDef; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
150 if (!labelVerUsed[i]) |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
151 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
152 if (mode == 1) |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
153 myDef = this.numVerTotal + 1 - i; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
154 else |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
155 myDef = i; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
156 if (amountDef == this.numVerDef - 1) |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
157 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
158 ret += myDef.ToString(); |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
159 break; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
160 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
161 else |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
162 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
163 ret += myDef.ToString() + ","; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
164 amountDef++; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
165 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
166 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
167 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
168 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
169 return ret; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
170 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
171 private string printMisc(int mode) |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
172 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
173 string ret = ""; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
174 if (this.graphType == "wheel" || this.graphType == "fan" || this.graphType == "doublefan") |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
175 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
176 int startPath, endPath; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
177 startPath = 0; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
178 switch (this.graphType) |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
179 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
180 case "fan": |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
181 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
182 startPath = 1; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
183 break; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
184 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
185 case "wheel": |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
186 case "doublefan": |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
187 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
188 startPath = 2; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
189 break; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
190 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
191 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
192 endPath = this.numVerMain-1; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
193 bool isConstant = true; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
194 for (int i = startPath; i < endPath; i++) |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
195 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
196 if (mode == 0) |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
197 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
198 if (this.labelVer[i] > this.labelVer[i + 1]) |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
199 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
200 isConstant = false; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
201 break; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
202 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
203 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
204 else if (mode == 1) |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
205 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
206 if (this.labelVer[i] < this.labelVer[i + 1]) |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
207 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
208 isConstant = false; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
209 break; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
210 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
211 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
212 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
213 if (isConstant) |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
214 ret += "constant"; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
215 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
216 if (mode == 1) |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
217 ret += "dual"; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
218 return ret; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
219 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
220 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
221 } |