view defical-sharp/libsemtd/Semtd.cs @ 1:758381a85d76 default tip

Incorrect printf format.
author Edho Prima Arief <me@myconan.net>
date Mon, 28 Jun 2010 14:52:19 +0700
parents ebed2bd0d300
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();
        }
    }
}