Exemplo n.º 1
0
 protected override void DoSave(string path)
 {
     using (StreamWriter stream = new StreamWriter(path))
     {
         string st = MathFormatProvider.ImportStringFromTable(Data);
         stream.Write(st);
     }
 }
Exemplo n.º 2
0
 protected override void DoSave(string path)
 {
     using (StreamWriter stream = new StreamWriter(path))
     {
         double value = Value;
         string st    = MathFormatProvider.InputStringFromDouble(value);
         stream.WriteLine(st);
     }
 }
Exemplo n.º 3
0
        internal void Run(string path)
        {
            List <Pixel2> pixels = Stability.FindStabilityMaximums(m_table, 1);

            if (0 == pixels.Count)
            {
                return;
            }


            int rows    = m_table.GetLength(0);
            int columns = m_table.GetLength(1);

            double[,] list = new double[rows * columns, 3];
            int index = 0;

            for (int r = 0; r < rows; ++r)
            {
                for (int c = 0; c < columns; ++c, ++index)
                {
                    list[index, 0] = CalcTp(r);
                    list[index, 1] = CalcShift(c);
                    list[index, 2] = m_table[r, c];
                }
            }
            string st = MathFormatProvider.ImportStringFromTable(list);


            if (pixels.Count > 3)
            {
                pixels.RemoveRange(3, pixels.Count - 3);
            }
            using (StreamWriter stream = new StreamWriter(path))
            {
                stream.WriteLine(st);
                foreach (var element in pixels)
                {
                    int    tp    = CalcTp(element.Y);
                    int    shift = CalcShift(element.X);
                    double value = m_table[element.Y, element.X];
                    stream.WriteLine("{0}\t{1}\t{2}", tp, shift, value);
                }
            }
        }