Ejemplo n.º 1
0
        /// <summary>
        /// 6. Добавление последовательностей элементов в массив
        /// </summary>
        private static async Task DataSequenceAddRowsTests()
        {
            using (SparseMatrixRepSeq sparseMatrixRepSeq = new SparseMatrixRepSeq("6"))
            {
                await sparseMatrixRepSeq.ClearAsync();

                double[] seq0   = new double[] { -5.55, 0, 15, 211, 0.09 };
                var      tuple0 = await sparseMatrixRepSeq.AddRowsSequenceAsync(seq0,
                                                                                new int[] { 0, 1, 2, 3, 4, 5 },
                                                                                new int[] { 2, 2, 3, 3, 4, 4 });

                await sparseMatrixRepSeq.PrintRowsFromSequences();

                double[] seq1   = new double[] { -1, -2, -3 };
                var      tuple1 = await sparseMatrixRepSeq.AddRowsSequenceAsync(seq1,
                                                                                new int[] { 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 },
                                                                                new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });

                await sparseMatrixRepSeq.PrintRowsFromSequences();
            }
            Console.WriteLine("---Successful end of method---");
        }