示例#1
0
        public ActionResult Input(string Count, string method, string create)
        {
            int c;

            int[] clustering;

            Clusterizing cluster = new Clusterizing();


            c = int.Parse(Count);
            cluster.InitializeTuples(c, create);
            if (method == "k-means")
            {
                clustering = cluster.Cluster();
            }
            else if (method == "Forel")
            {
                clustering = cluster.Cluster2();
            }
            return(View());
        }
示例#2
0
        public ActionResult Contact(string Vertex, string method, string create)
        {
            int c;

            int[] clustering = { };

            Clusterizing cluster = new Clusterizing();

            if (Vertex.Length != 0)
            {
                c = int.Parse(Vertex);
                cluster.InitializeTuples(c, create);
                if (method == "k-means")
                {
                    clustering = cluster.Cluster();
                }
                else if (method == "Forel")
                {
                    clustering = cluster.Cluster2();
                }
                ViewBag.Mass = clustering;
            }
            return(View("Contact"));
        }