private void GenerateData(NDataSeriesDouble dataSeries, int count)
 {
     for (int i = 0; i < count; i++)
     {
         dataSeries.Add(Random.NextDouble() * 59 + 1);
     }
 }
Beispiel #2
0
        private void FillDataSeries(NDataSeriesDouble ds, int nCount)
        {
            ds.Clear();

            for (int i = 0; i < nCount; i++)
            {
                ds.Add(Random.NextDouble() * 3);
            }
        }
        private void GenerateData(NDataSeriesDouble ds1, NDataSeriesDouble ds2, int nTotalCount, int nMaxEmptyCount)
        {
            SortedList arrEmptyIndices = new SortedList();

            for (int i = 0; i < nMaxEmptyCount; i++)
            {
                int nEmptyIndex = Random.Next(0, nTotalCount);
                arrEmptyIndices[nEmptyIndex] = null;
            }

            for (int k = 0; k < nTotalCount; k++)
            {
                if (arrEmptyIndices.ContainsKey(k))
                {
                    ds1.Add(DBNull.Value);
                }
                else
                {
                    ds1.Add(Random.NextDouble() * 10);
                }

                ds2.Add(Random.NextDouble() * 10);
            }
        }