public void StRayAlgo()//straight ray algorithm
        {
            if (_result.Count == 0)
            {
                _result.Clear();
            }
            int n_d = _initialDiffusivity.Count; //he number of cells, it equals the number of columns of matrix A
            int n_t = _tProcessed.Count;         //the number of travel times, it equals the number of rows of matrix A
            // b=Ax, x->x2
            // consider b as time, A as distance, x as speed
            double          xMax       = 1.0 / (Math.Sqrt(_iP.MinD)); // set the constraint, the max of x, x=1/(root of diffusivity)
            double          xMin       = 1.0 / (Math.Sqrt(_iP.MaxD)); // set the constraint, the min of x, x=1/(root of diffusivity)
            List <double>   estimatedD = _initialDiffusivity.ToList();
            Vector <double> x          = Vector <double> .Build.Dense(n_d, 1);

            for (int i = 0; i < n_d; i++)
            {
                x[i] = 1.0 / (Math.Sqrt(estimatedD[i]));//the speed vector, x=1/(root of diffusivity)
            }

            #region
            int    iter = 0;
            double RMS  = _iP.CriRMS + 1;
            while (iter <_iP.StrRay& RMS> _iP.CriRMS)
            {
                //STEP 1
                SIRT_Result_StraightRay Record = new SIRT_Result_StraightRay();
                Record.Iter          = iter;
                Record.OldProcessedD = x.ToList();
                //====================================================
                //STEP 2 : Set matrix A
                Matrix <double> A = Matrix <double> .Build.Dense(n_t, n_d, 0);

                for (int row = 0; row < n_t; row++)
                {
                    Inv_SRInfoLine infoLine = (Inv_SRInfoLine)_table.SRInfoLineList[row];
                    MathNet.Spatial.Euclidean.Point2D PStart = new MathNet.Spatial.Euclidean.Point2D(infoLine.Start.Coor[0], infoLine.Start.Coor[2]);
                    MathNet.Spatial.Euclidean.Point2D PEnd   = new MathNet.Spatial.Euclidean.Point2D(infoLine.End.Coor[0], infoLine.End.Coor[2]);
                    MathNet.Spatial.Euclidean.Line2D  Traj   = new MathNet.Spatial.Euclidean.Line2D(PStart, PEnd);
                    for (int col = 0; col < n_d; col++)
                    {
                        CohenSutherland coh = new CohenSutherland();
                        List <MathNet.Spatial.Euclidean.Point2D> Ps = coh.CohenSutherlandLineClip(_fRs[col], PStart, PEnd).ToList();
                        if (Ps.Count > 1)
                        {
                            A[row, col] = Ps[0].DistanceTo(Ps[1]);
                        }
                    }
                }
                Record.A             = A.Clone();
                Record.ProcessedTime = (A * x).ToList();
                //====================================================
                //STEP 3 : set the start node and the end node from Record
                foreach (object obj in _table.SRInfoLineList)
                {
                    Inv_SRInfoLine infoLine = (Inv_SRInfoLine)obj;
                    Record.Start.Add(infoLine.Start);
                    Record.End.Add(infoLine.End);
                }
                //====================================================
                //STEP 4 : cimmino calculation
                Vector <double> b = Vector <double> .Build.DenseOfArray(_tProcessed.ToArray());

                SIRT_Options    so = new SIRT_Options(b, A, x, 1);// b=Ax
                Vector <double> x2 = so.XUpdaterDROP(x, 1);
                //====================================================
                //STEP 7 : update x and diffusivity for next iteration
                x = x2.Clone();
                for (int i = 0; i < n_d; i++)
                {
                    if (x[i] < conMinX[i])
                    {
                        x[i] = conMinX[i];
                    }
                    if (x[i] > conMaxX[i])
                    {
                        x[i] = conMaxX[i];
                    }
                }
                Record.NewProcessedD = x.ToList();
                //====================================================
                _result.Add(Record);//output
                iter = iter + 1;
            }
            #endregion
        }