public override void Solve() { MatrixInterface <double> matrix = this.matrix.Copy(); MakeTriangle(matrix.Vectors); solution = SOLAEMatrixUtil.solveTriangleMatrix(matrix as DoubleMatrix, SOLAEMatrixUtil.UPPER); }
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()); }
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) { }
protected abstract SOLAEParallelMethodInterface <double> GetMethod(MatrixInterface <double> matrix);
public GaussMethod(MatrixInterface <Double> matrix) : base(matrix, "Gauss") { }
public GaussParallelMethod(MatrixInterface <Double> matrix) : this(matrix, new string[] { "http://127.0.0.1/" }) { }
public GaussParallelMethod(MatrixInterface <Double> matrix, string[] addresses) : base(matrix) { name = "Gauss parallel"; this.Addresses = addresses; }