Exemplo n.º 1
0
        public override void Solve()
        {
            MatrixInterface <double> matrix = this.matrix.Copy();

            MakeTriangle(matrix.Vectors);
            solution = SOLAEMatrixUtil.solveTriangleMatrix(matrix as DoubleMatrix, SOLAEMatrixUtil.UPPER);
        }
Exemplo n.º 2
0
        public static void WriteMatrix(MatrixInterface <double> doubleMatrix)
        {
            VectorInterface <Double>[] matrix = doubleMatrix.Vectors;
            StringBuilder data = new StringBuilder();
            StringBuilder b    = new StringBuilder();

            for (int i = 0; i < matrix.Length; i++)
            {
                for (int j = 0; j < matrix[i].Count - 1; j++)
                {
                    data.Append(matrix[i][j]);
                    if (j != matrix[i].Count - 2)
                    {
                        data.Append(' ');
                    }
                }
                b.Append(matrix[i][matrix[i].Count - 1]);
                if (i != matrix.Length - 1)
                {
                    data.Append('\n');
                    b.Append('\n');
                }
            }

            Write("matrix.txt", data.ToString());
            Write("b.txt", b.ToString());
        }
Exemplo n.º 3
0
 public AbstractMethodStatistics(MatrixInterface <double> matrix, params int[] threadsCount)
 {
     this.matrix        = matrix;
     this.threadsCounts = threadsCount;
     workStatistic      = new Dictionary <int, long>();
     addresses          = FileHandler.ReadIPs();
     addresses          = addresses.Take(1).ToArray();
 }
 protected override SOLAEParallelMethodInterface <double> GetMethod(MatrixInterface <double> matrix)
 {
     return(new GaussParallelMethod(matrix));
 }
 public GaussStatisticsMaker(MatrixInterface <Double> matrix, params int[] threadsCount) : base(matrix, threadsCount)
 {
 }
Exemplo n.º 6
0
 protected abstract SOLAEParallelMethodInterface <double> GetMethod(MatrixInterface <double> matrix);
Exemplo n.º 7
0
 public GaussMethod(MatrixInterface <Double> matrix) : base(matrix, "Gauss")
 {
 }
Exemplo n.º 8
0
 public GaussParallelMethod(MatrixInterface <Double> matrix) : this(matrix, new string[] { "http://127.0.0.1/" })
 {
 }
Exemplo n.º 9
0
 public GaussParallelMethod(MatrixInterface <Double> matrix, string[] addresses) : base(matrix)
 {
     name           = "Gauss parallel";
     this.Addresses = addresses;
 }