comparison defical-sharp/libsemtd/Semtd.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
comparison
equal deleted inserted replaced
-1:000000000000 0:ebed2bd0d300
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5
6 namespace libsemtd
7 {
8 public partial class Semtd
9 {
10 public Semtd()
11 {
12 throw new NotSupportedException();
13 }
14 public Semtd(string graphType, int numVerMain, int numVerDef)
15 {
16 switch (graphType)
17 {
18 case "wheel":
19 case "fan":
20 case "doublefan":
21 {
22 this.graphType = graphType;
23 break;
24 }
25 default:
26 {
27 throw new NotSupportedException();
28 }
29 }
30 if ((numVerDef < 0) || (numVerMain < 4))
31 {
32 throw new NotSupportedException();
33 }
34 else
35 {
36 this.numVerMain = numVerMain;
37 this.numVerDef = numVerDef;
38 this.numVerTotal = this.numVerMain + this.numVerDef;
39 }
40 this.numEdges = 0;
41 this.graphConn = new bool[this.numVerMain, this.numVerMain];
42 draw(this.graphType, 0, this.numVerMain - 1);
43 labelReset();
44 }
45 }
46 }