コード例 #1
0
        private void run_detection_Click(object sender, EventArgs e)
        {
            detection detect = new detection(this.testgraph, this.loaded_data);

            patternsDetected = detect.runDetection(0, Form1.nbHours, this.matriceUser, this.typeofpattern);
            testgraph.button_next_pattern.Visible  = true;
            testgraph.button_previous_patt.Visible = true;

            if (patternsDetected.Count == 0)
            {
                this.label_patdet.Text = "No pattern detected";
            }

            else
            {
                this.label_patdet.Text = patternsDetected.Count.ToString() + " patterns detected !";
            }

            int nb_hands3_5  = 0;
            int nb_hands5_7  = 0;
            int nb_hands7_10 = 0;

            for (int i = 0; i < patternsDetected.Count; i++)
            {
                if (patternsDetected[i].type == typeofpattern)
                {
                    if (patternsDetected[i].sum >= 3 && patternsDetected[i].sum < 5)
                    {
                        nb_hands3_5++;
                    }
                    if (patternsDetected[i].sum >= 5 && patternsDetected[i].sum < 7)
                    {
                        nb_hands5_7++;
                    }
                    if (patternsDetected[i].sum >= 7 && patternsDetected[i].sum <= 10)
                    {
                        nb_hands7_10++;
                    }
                }
            }

            stat.addPattern(typeofpattern, nb_hands3_5, 1);
            stat.addPattern(typeofpattern, nb_hands5_7, 2);
            stat.addPattern(typeofpattern, nb_hands7_10, 3);
            stat.addPattern(typeofpattern, nb_hands3_5 + nb_hands5_7 + nb_hands7_10, 4);
        }
コード例 #2
0
 private void run_detection_live()
 {
     detection detect = new detection(this.testgraph, this.loaded_data);
     //detect.runDetection(detect.listOfDatas.Count - 10);
 }
コード例 #3
0
        private void run_detection_Click(object sender, EventArgs e)
        {
            detection detect = new detection(this.testgraph,this.loaded_data);
            patternsDetected = detect.runDetection(0, Form1.nbHours, this.matriceUser, this.typeofpattern);
            testgraph.button_next_pattern.Visible = true;
            testgraph.button_previous_patt.Visible = true;

            if (patternsDetected.Count == 0)
            {
                this.label_patdet.Text = "No pattern detected";
            }

            else
            {
                this.label_patdet.Text = patternsDetected.Count.ToString() + " patterns detected !";
            }

            int nb_hands3_5 = 0;
            int nb_hands5_7 = 0;
            int nb_hands7_10 = 0;

            for (int i = 0; i < patternsDetected.Count; i++)
            {
                if (patternsDetected[i].type == typeofpattern)
                {
                    if (patternsDetected[i].sum >= 3 && patternsDetected[i].sum < 5)
                    {
                        nb_hands3_5++;
                    }
                    if (patternsDetected[i].sum >= 5 && patternsDetected[i].sum < 7)
                    {
                        nb_hands5_7++;
                    }
                    if (patternsDetected[i].sum >= 7 && patternsDetected[i].sum <= 10)
                    {
                        nb_hands7_10++;
                    }
                }
            }

            stat.addPattern(typeofpattern, nb_hands3_5, 1);
            stat.addPattern(typeofpattern, nb_hands5_7, 2);
            stat.addPattern(typeofpattern, nb_hands7_10, 3);
            stat.addPattern(typeofpattern, nb_hands3_5 + nb_hands5_7 + nb_hands7_10, 4);
        }
コード例 #4
0
 private void run_detection_live()
 {
     detection detect = new detection(this.testgraph, this.loaded_data);
     //detect.runDetection(detect.listOfDatas.Count - 10);
 }