public void LoadMatrices() { // fraction _sfrA = _handler.LoadFractionMatrix(IO.PrefixFraction + IO.FileA, false).Item1; _sfrB = _handler.LoadFractionMatrix(IO.PrefixFraction + IO.FileB, false).Item1; _sfrC = _handler.LoadFractionMatrix(IO.PrefixFraction + IO.FileC, false).Item1; _sfrX = _handler.LoadFractionVector(IO.PrefixFraction + IO.FileX, false).Item1; // float _sfA = _handler.LoadFloatMatrix(IO.PrefixFloat + IO.FileA, false).Item1; _sfB = _handler.LoadFloatMatrix(IO.PrefixFloat + IO.FileB, false).Item1; _sfC = _handler.LoadFloatMatrix(IO.PrefixFloat + IO.FileC, false).Item1; _sfX = _handler.LoadFloatVector(IO.PrefixFloat + IO.FileX, false).Item1; // double _sdA = _handler.LoadDoubleMatrix(IO.PrefixDouble + IO.FileA, false).Item1; _sdB = _handler.LoadDoubleMatrix(IO.PrefixDouble + IO.FileB, false).Item1; _sdC = _handler.LoadDoubleMatrix(IO.PrefixDouble + IO.FileC, false).Item1; _sdX = _handler.LoadDoubleVector(IO.PrefixDouble + IO.FileX, false).Item1; }
public void GaussTimeComparison() { var fractionFull = _handler.LoadDoubleVector(IO.PrefixFraction + IO.ResultFullPivot, true); var fractionPartial = _handler.LoadDoubleVector(IO.PrefixFraction + IO.ResultPartialPivot, true); var fractionNo = _handler.LoadDoubleVector(IO.PrefixFraction + IO.ResultNoPivot, true); var doubleFull = _handler.LoadDoubleVector(IO.PrefixDouble + IO.ResultFullPivot, true); var doublePartial = _handler.LoadDoubleVector(IO.PrefixDouble + IO.ResultPartialPivot, true); var doubleNo = _handler.LoadDoubleVector(IO.PrefixDouble + IO.ResultNoPivot, true); var floatFull = _handler.LoadDoubleVector(IO.PrefixFloat + IO.ResultFullPivot, true); var floatPartial = _handler.LoadDoubleVector(IO.PrefixFloat + IO.ResultPartialPivot, true); var floatNo = _handler.LoadDoubleVector(IO.PrefixFloat + IO.ResultNoPivot, true); var edoubleFull = _handler.LoadDoubleVector(IO.PrefixEigen + IO.PrefixDouble + IO.ResultFullPivot, true); var edoublePartial = _handler.LoadDoubleVector(IO.PrefixEigen + IO.PrefixDouble + IO.ResultPartialPivot, true); var efloatFull = _handler.LoadDoubleVector(IO.PrefixEigen + IO.PrefixFloat + IO.ResultFullPivot, true); var efloatPartial = _handler.LoadDoubleVector(IO.PrefixEigen + IO.PrefixFloat + IO.ResultPartialPivot, true); var timeHeader = string.Format ( "{0};{1};{2};{3}", "typ", "Gauss-Full-Pivot", "Gauss-Partial-Pivot", "Gauss-No-Pivot" ); var timeFraction = string.Format ( "{0};{1};{2};{3}", "csh-fraction", fractionFull.Item2, fractionPartial.Item2, fractionNo.Item2 ); var timeDouble = string.Format ( "{0};{1};{2};{3}", "csh-double", doubleFull.Item2, doublePartial.Item2, doubleNo.Item2 ); var timeFloat = string.Format ( "{0};{1};{2};{3}", "csh-float", floatFull.Item2, floatPartial.Item2, floatNo.Item2 ); var timeEigenDouble = string.Format ( "{0};{1};{2};{3}", "eig-double", edoubleFull.Item2, edoublePartial.Item2, string.Empty ); var timeEigenFloat = string.Format ( "{0};{1};{2};{3}", "eig-float", efloatFull.Item2, efloatPartial.Item2, string.Empty ); var sb = new StringBuilder(); sb.AppendLine(timeHeader); sb.AppendLine(timeEigenDouble); sb.AppendLine(timeEigenFloat); sb.AppendLine(timeDouble); sb.AppendLine(timeFloat); sb.AppendLine(timeFraction); File.WriteAllText(IO.SummaryTimeGauss, sb.ToString()); }