Esempio n. 1
0
        public void intervalTally(Interval_Histogram afterIH,
                                  Interval_Histogram acrossIH,
                                  Interval_Histogram verticalIH)
        {
            foreach (Vertex v in vertical)
            {
                Interval i = vector.interval(v.vector);
                verticalIH.Tally(i);
            }

            foreach (Vertex v in acrossi)
            {
                Interval i = vector.interval(v.vector);
                acrossIH.Tally(i);
            }
            foreach (Vertex v in acrossp)
            {
                Interval i = vector.interval(v.vector);
                acrossIH.Tally(i);
            }
            foreach (KeyValuePair <Vertex, Parallel> v in after)
            {
                Interval i = vector.interval(v.Key.vector);
                afterIH.Tally(i);
            }
        }
Esempio n. 2
0
        public void intevalHistograms()
        {
            StreamWriter acrossf   = new StreamWriter(file_prefix + "acrossIH.txt");
            StreamWriter afterf    = new StreamWriter(file_prefix + "afterIH.txt");
            StreamWriter verticalf = new StreamWriter(file_prefix + "verticalIH.txt");

            Interval_Histogram acrossIH   = vectorFactory.getHistogram();
            Interval_Histogram afterIH    = vectorFactory.getHistogram();
            Interval_Histogram verticalIH = vectorFactory.getHistogram();

            for (int vi = 0; vi < vertex_count; vi++)
            {
                vertices[vi].intervalTally(afterIH, acrossIH, verticalIH);
            }

            acrossIH.Write(acrossf);
            afterIH.Write(afterf);
            verticalIH.Write(verticalf);

            acrossf.Close();
            afterf.Close();
            verticalf.Close();
        }