Mercurial > defical
view 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 |
line wrap: on
line source
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace libsemtd { public partial class Semtd { public Semtd() { throw new NotSupportedException(); } public Semtd(string graphType, int numVerMain, int numVerDef) { switch (graphType) { case "wheel": case "fan": case "doublefan": { this.graphType = graphType; break; } default: { throw new NotSupportedException(); } } if ((numVerDef < 0) || (numVerMain < 4)) { throw new NotSupportedException(); } else { this.numVerMain = numVerMain; this.numVerDef = numVerDef; this.numVerTotal = this.numVerMain + this.numVerDef; } this.numEdges = 0; this.graphConn = new bool[this.numVerMain, this.numVerMain]; draw(this.graphType, 0, this.numVerMain - 1); labelReset(); } } }