Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading;
- using System.Threading.Tasks;
- namespace Matrix_M_B
- {
- class Matrx
- {
- private int m = 100;
- private double[,] A;
- private double[,] B;
- private int n = 100;
- private double[,] Result;
- public static void Main ()
- {
- List<int> A = new List<int>() { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
- List<int> B = new List<int>() { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
- }
- public Matrx( int m, int n, double[,] result , int amountflow)
- {
- Result = result;
- Parallel.For(0, m, i => {
- for (int j = 0; j < 100; j++)
- {
- for (int k = 0; k < 100; k++)
- {
- Result[i, j] += A[i, k] * B[k, j];
- }
- }
- }
- );
- Console.ReadKey();
- }
- public void Rresult (double[,] A,double[,] B)
- {
- Console.WriteLine("Matrx: {0} start.", A);
- Thread.Sleep(2000);
- Console.WriteLine("Matrx: {0} done.", B);
- }
- }
- }
Add Comment
Please, Sign In to add comment