Skip to content

Commit 9a5cf21

Browse files
author
Dominic Beger
committed
Rename Algorithm to Algorithms and make it static
1 parent c0c4639 commit 9a5cf21

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

SharpMath/Algorithm.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace SharpMath
1111
/// <summary>
1212
/// Provides algorithms for common mathematical operations.
1313
/// </summary>
14-
public class Algorithm
14+
public static class Algorithms
1515
{
1616
/// <summary>
1717
/// Implements the Gauss-Jordan-algorithm.

SharpMath/Equations/LinearEquationSystem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public double[] Solve()
7575
rightSide[i, 0] = currentEquation.Result;
7676
}
7777

78-
var resultMatrix = Algorithm.GaussJordan(leftSide, rightSide);
78+
var resultMatrix = Algorithms.GaussJordan(leftSide, rightSide);
7979
double[] result = new double[rightSide.RowCount];
8080
for (uint i = 0; i < resultMatrix.RowCount; ++i)
8181
result[i] = resultMatrix[i, 0];

SharpMath/Expressions/Parser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public double Evaluate()
3838

3939
var resultStack = new Stack<double>();
4040
var infixTokens = Token.CalculateInfixTokens(Expression);
41-
var postfixTokens = Algorithm.ShuntingYard(infixTokens.ToList());
41+
var postfixTokens = Algorithms.ShuntingYard(infixTokens.ToList());
4242
foreach (var pToken in postfixTokens)
4343
pToken.Evaluate(resultStack);
4444

SharpMath/Geometry/SquareMatrix.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public SquareMatrix(uint dimension)
3838
/// <summary>
3939
/// Gets the inverse of this <see cref="SquareMatrix" />.
4040
/// </summary>
41-
public SquareMatrix Inverse => FromMatrix(Algorithm.GaussJordan(this, GetIdentity(ColumnCount)));
41+
public SquareMatrix Inverse => FromMatrix(Algorithms.GaussJordan(this, GetIdentity(ColumnCount)));
4242

4343
/// <summary>
4444
/// Gets the determinant of this <see cref="SquareMatrix" />.

0 commit comments

Comments
 (0)