Ejemplo n.º 1
0
        /// <summary>
        /// Тестовый запрос на выборку отдельного элемента массива с выводом информации в консоль
        /// </summary>
        /// <param name="sparseMatrixRepSeq"></param>
        /// <param name="rowIndex"></param>
        /// <param name="colIndex"></param>
        /// <returns></returns>
        private static async Task <double> GetElementAsyncTest(SparseMatrixRepSeq sparseMatrixRepSeq, int rowIndex, int colIndex)
        {
            double element = 0;

            try
            {
                element = await sparseMatrixRepSeq.GetElementAsync(rowIndex, colIndex);

                Console.WriteLine($"[{rowIndex}, {colIndex}] = {element}");
            }
            catch (Exception exc)
            {
                Console.WriteLine(exc.Message);
            }

            return(element);
        }