Skip to content

Commit 017726f

Browse files
committed
Fix stylecop issues
1 parent 2c9a300 commit 017726f

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

Algorithms.Tests/ModularArithmetic/ExtendedEuclideanAlgorithmTest.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ public static void TestCompute(long a, long b, long expectedGCD, long expectedBe
2323
var eeaResult = ExtendedEuclideanAlgorithm.Compute(a, b);
2424

2525
// Assert
26-
Assert.That(eeaResult.gcd, Is.EqualTo(expectedGCD));
27-
Assert.That(eeaResult.bezoutA, Is.EqualTo(expectedBezoutOfA));
28-
Assert.That(eeaResult.bezoutB, Is.EqualTo(expectedBezoutOfB));
26+
Assert.That(eeaResult.Gcd, Is.EqualTo(expectedGCD));
27+
Assert.That(eeaResult.BezoutA, Is.EqualTo(expectedBezoutOfA));
28+
Assert.That(eeaResult.BezoutB, Is.EqualTo(expectedBezoutOfB));
2929
}
3030

3131
[TestCase(240, 46, 2, -9, 47)]
@@ -45,8 +45,8 @@ public static void TestCompute_BigInteger(long a, long b, long expectedGCD, long
4545
var eeaResult = ExtendedEuclideanAlgorithm.Compute(new BigInteger(a), new BigInteger(b));
4646

4747
// Assert
48-
Assert.That(eeaResult.gcd, Is.EqualTo(new BigInteger(expectedGCD)));
49-
Assert.That(eeaResult.bezoutA, Is.EqualTo(new BigInteger(expectedBezoutOfA)));
50-
Assert.That(eeaResult.bezoutB, Is.EqualTo(new BigInteger(expectedBezoutOfB)));
48+
Assert.That(eeaResult.Gcd, Is.EqualTo(new BigInteger(expectedGCD)));
49+
Assert.That(eeaResult.BezoutA, Is.EqualTo(new BigInteger(expectedBezoutOfA)));
50+
Assert.That(eeaResult.BezoutB, Is.EqualTo(new BigInteger(expectedBezoutOfB)));
5151
}
5252
}

Algorithms/ModularArithmetic/ExtendedEuclideanAlgorithm.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ namespace Algorithms.ModularArithmetic;
88
public static class ExtendedEuclideanAlgorithm
99
{
1010
/// <summary>
11-
/// Computes the greatest common divisor (gcd) of integers a and b, also the coefficients of Bézout's identity,
12-
/// which are integers x and y such that a*bezoutCoefficientOfA + b*bezoutCoefficientOfB = gcd(a, b).
11+
/// Computes the greatest common divisor (Gcd) of integers a and b, also the coefficients of Bézout's identity,
12+
/// which are integers x and y such that a*bezoutCoefficientOfA + b*bezoutCoefficientOfB = Gcd(a, b).
1313
/// </summary>
1414
/// <param name="a">Input number.</param>
1515
/// <param name="b">Second input number.</param>
16-
/// <returns>A record of ExtendedEuclideanAlgorithmResult containing the bezout coefficients of a and b as well as the gcd(a,b).</returns>
16+
/// <returns>A record of ExtendedEuclideanAlgorithmResult containing the bezout coefficients of a and b as well as the Gcd(a,b).</returns>
1717
public static ExtendedEuclideanAlgorithmResult<long> Compute(long a, long b)
1818
{
1919
long quotient;
@@ -46,12 +46,12 @@ public static ExtendedEuclideanAlgorithmResult<long> Compute(long a, long b)
4646
}
4747

4848
/// <summary>
49-
/// Computes the greatest common divisor (gcd) of integers a and b, also the coefficients of Bézout's identity,
50-
/// which are integers x and y such that a*bezoutCoefficientOfA + b*bezoutCoefficientOfB = gcd(a, b).
49+
/// Computes the greatest common divisor (Gcd) of integers a and b, also the coefficients of Bézout's identity,
50+
/// which are integers x and y such that a*bezoutCoefficientOfA + b*bezoutCoefficientOfB = Gcd(a, b).
5151
/// </summary>
5252
/// <param name="a">Input number.</param>
5353
/// <param name="b">Second input number.</param>
54-
/// <returns>A record of ExtendedEuclideanAlgorithmResult containing the bezout coefficients of a and b as well as the gcd(a,b).</returns>
54+
/// <returns>A record of ExtendedEuclideanAlgorithmResult containing the bezout coefficients of a and b as well as the Gcd(a,b).</returns>
5555
public static ExtendedEuclideanAlgorithmResult<BigInteger> Compute(BigInteger a, BigInteger b)
5656
{
5757
BigInteger quotient;
@@ -87,8 +87,8 @@ public static ExtendedEuclideanAlgorithmResult<BigInteger> Compute(BigInteger a,
8787
/// The result type for the computation of the Extended Euclidean Algorithm.
8888
/// </summary>
8989
/// <typeparam name="T">The data type of the computation (i.e. long or BigInteger).</typeparam>
90-
/// <param name="bezoutA">The bezout coefficient of the parameter a to the computation.</param>
91-
/// <param name="bezoutB">The bezout coefficient of the parameter b to the computation.</param>
92-
/// <param name="gcd">The greatest common divisor of the parameters a and b to the computation.</param>
93-
public record ExtendedEuclideanAlgorithmResult<T>(T bezoutA, T bezoutB, T gcd);
90+
/// <param name="BezoutA">The bezout coefficient of the parameter a to the computation.</param>
91+
/// <param name="BezoutB">The bezout coefficient of the parameter b to the computation.</param>
92+
/// <param name="Gcd">The greatest common divisor of the parameters a and b to the computation.</param>
93+
public record ExtendedEuclideanAlgorithmResult<T>(T BezoutA, T BezoutB, T Gcd);
9494
}

0 commit comments

Comments
 (0)