Browse Source

LA: cosmetics: more semantic operator ordering, instead of alphabetic

v3
Christoph Ruegg 10 years ago
parent
commit
54d3407f72
  1. 96
      src/Numerics/LinearAlgebra/Matrix.Operators.cs
  2. 97
      src/Numerics/LinearAlgebra/Vector.Operators.cs

96
src/Numerics/LinearAlgebra/Matrix.Operators.cs

@ -307,13 +307,13 @@ namespace MathNet.Numerics.LinearAlgebra
} }
/// <summary> /// <summary>
/// Computes the log of a matrix pointwise /// Computes the sqrt of a matrix pointwise
/// </summary> /// </summary>
/// <param name="x">The input matrix</param> /// <param name="x">The input matrix</param>
/// <returns></returns> /// <returns></returns>
public static Matrix<T> Log(Matrix<T> x) public static Matrix<T> Sqrt(Matrix<T> x)
{ {
return x.PointwiseLog(); return x.PointwiseSqrt();
} }
/// <summary> /// <summary>
@ -327,153 +327,153 @@ namespace MathNet.Numerics.LinearAlgebra
} }
/// <summary> /// <summary>
/// Computes the absolute value of a matrix pointwise /// Computes the log of a matrix pointwise
/// </summary> /// </summary>
/// <param name="x">The input matrix</param> /// <param name="x">The input matrix</param>
/// <returns></returns> /// <returns></returns>
public static Matrix<T> Abs(Matrix<T> x) public static Matrix<T> Log(Matrix<T> x)
{ {
return x.PointwiseAbs(); return x.PointwiseLog();
} }
/// <summary> /// <summary>
/// Computes the acos of a matrix pointwise /// Computes the log10 of a matrix pointwise
/// </summary> /// </summary>
/// <param name="x">The input matrix</param> /// <param name="x">The input matrix</param>
/// <returns></returns> /// <returns></returns>
public static Matrix<T> Acos(Matrix<T> x) public static Matrix<T> Log10(Matrix<T> x)
{ {
return x.PointwiseAcos(); return x.PointwiseLog10();
} }
/// <summary> /// <summary>
/// Computes the asin of a matrix pointwise /// Computes the sin of a matrix pointwise
/// </summary> /// </summary>
/// <param name="x">The input matrix</param> /// <param name="x">The input matrix</param>
/// <returns></returns> /// <returns></returns>
public static Matrix<T> Asin(Matrix<T> x) public static Matrix<T> Sin(Matrix<T> x)
{ {
return x.PointwiseAsin(); return x.PointwiseSin();
} }
/// <summary> /// <summary>
/// Computes the atan of a matrix pointwise /// Computes the cos of a matrix pointwise
/// </summary> /// </summary>
/// <param name="x">The input matrix</param> /// <param name="x">The input matrix</param>
/// <returns></returns> /// <returns></returns>
public static Matrix<T> Atan(Matrix<T> x) public static Matrix<T> Cos(Matrix<T> x)
{ {
return x.PointwiseAtan(); return x.PointwiseCos();
} }
/// <summary> /// <summary>
/// Computes the ceiling of a matrix pointwise /// Computes the tan of a matrix pointwise
/// </summary> /// </summary>
/// <param name="x">The input matrix</param> /// <param name="x">The input matrix</param>
/// <returns></returns> /// <returns></returns>
public static Matrix<T> Ceiling(Matrix<T> x) public static Matrix<T> Tan(Matrix<T> x)
{ {
return x.PointwiseCeiling(); return x.PointwiseTan();
} }
/// <summary> /// <summary>
/// Computes the cos of a matrix pointwise /// Computes the asin of a matrix pointwise
/// </summary> /// </summary>
/// <param name="x">The input matrix</param> /// <param name="x">The input matrix</param>
/// <returns></returns> /// <returns></returns>
public static Matrix<T> Cos(Matrix<T> x) public static Matrix<T> Asin(Matrix<T> x)
{ {
return x.PointwiseCos(); return x.PointwiseAsin();
} }
/// <summary> /// <summary>
/// Computes the cosh of a matrix pointwise /// Computes the acos of a matrix pointwise
/// </summary> /// </summary>
/// <param name="x">The input matrix</param> /// <param name="x">The input matrix</param>
/// <returns></returns> /// <returns></returns>
public static Matrix<T> Cosh(Matrix<T> x) public static Matrix<T> Acos(Matrix<T> x)
{ {
return x.PointwiseCosh(); return x.PointwiseAcos();
} }
/// <summary> /// <summary>
/// Computes the floor of a matrix pointwise /// Computes the atan of a matrix pointwise
/// </summary> /// </summary>
/// <param name="x">The input matrix</param> /// <param name="x">The input matrix</param>
/// <returns></returns> /// <returns></returns>
public static Matrix<T> Floor(Matrix<T> x) public static Matrix<T> Atan(Matrix<T> x)
{ {
return x.PointwiseFloor(); return x.PointwiseAtan();
} }
/// <summary> /// <summary>
/// Computes the log10 of a matrix pointwise /// Computes the sinh of a matrix pointwise
/// </summary> /// </summary>
/// <param name="x">The input matrix</param> /// <param name="x">The input matrix</param>
/// <returns></returns> /// <returns></returns>
public static Matrix<T> Log10(Matrix<T> x) public static Matrix<T> Sinh(Matrix<T> x)
{ {
return x.PointwiseLog10(); return x.PointwiseSinh();
} }
/// <summary> /// <summary>
/// Computes the rounded value of a matrix pointwise /// Computes the cosh of a matrix pointwise
/// </summary> /// </summary>
/// <param name="x">The input matrix</param> /// <param name="x">The input matrix</param>
/// <returns></returns> /// <returns></returns>
public static Matrix<T> Round(Matrix<T> x) public static Matrix<T> Cosh(Matrix<T> x)
{ {
return x.PointwiseRound(); return x.PointwiseCosh();
} }
/// <summary> /// <summary>
/// Computes the sin of a matrix pointwise /// Computes the tanh of a matrix pointwise
/// </summary> /// </summary>
/// <param name="x">The input matrix</param> /// <param name="x">The input matrix</param>
/// <returns></returns> /// <returns></returns>
public static Matrix<T> Sin(Matrix<T> x) public static Matrix<T> Tanh(Matrix<T> x)
{ {
return x.PointwiseSin(); return x.PointwiseTanh();
} }
/// <summary> /// <summary>
/// Computes the sinh of a matrix pointwise /// Computes the absolute value of a matrix pointwise
/// </summary> /// </summary>
/// <param name="x">The input matrix</param> /// <param name="x">The input matrix</param>
/// <returns></returns> /// <returns></returns>
public static Matrix<T> Sinh(Matrix<T> x) public static Matrix<T> Abs(Matrix<T> x)
{ {
return x.PointwiseSinh(); return x.PointwiseAbs();
} }
/// <summary> /// <summary>
/// Computes the sqrt of a matrix pointwise /// Computes the floor of a matrix pointwise
/// </summary> /// </summary>
/// <param name="x">The input matrix</param> /// <param name="x">The input matrix</param>
/// <returns></returns> /// <returns></returns>
public static Matrix<T> Sqrt(Matrix<T> x) public static Matrix<T> Floor(Matrix<T> x)
{ {
return x.PointwiseSqrt(); return x.PointwiseFloor();
} }
/// <summary> /// <summary>
/// Computes the tan of a matrix pointwise /// Computes the ceiling of a matrix pointwise
/// </summary> /// </summary>
/// <param name="x">The input matrix</param> /// <param name="x">The input matrix</param>
/// <returns></returns> /// <returns></returns>
public static Matrix<T> Tan(Matrix<T> x) public static Matrix<T> Ceiling(Matrix<T> x)
{ {
return x.PointwiseTan(); return x.PointwiseCeiling();
} }
/// <summary> /// <summary>
/// Computes the tanh of a matrix pointwise /// Computes the rounded value of a matrix pointwise
/// </summary> /// </summary>
/// <param name="x">The input matrix</param> /// <param name="x">The input matrix</param>
/// <returns></returns> /// <returns></returns>
public static Matrix<T> Tanh(Matrix<T> x) public static Matrix<T> Round(Matrix<T> x)
{ {
return x.PointwiseTanh(); return x.PointwiseRound();
} }
} }
} }

97
src/Numerics/LinearAlgebra/Vector.Operators.cs

@ -273,13 +273,13 @@ namespace MathNet.Numerics.LinearAlgebra
} }
/// <summary> /// <summary>
/// Computes the log of a vector pointwise /// Computes the sqrt of a vector pointwise
/// </summary> /// </summary>
/// <param name="x">The input vector</param> /// <param name="x">The input vector</param>
/// <returns></returns> /// <returns></returns>
public static Vector<T> Log(Vector<T> x) public static Vector<T> Sqrt(Vector<T> x)
{ {
return x.PointwiseUnary(x.PointwiseLog); return x.PointwiseSqrt();
} }
/// <summary> /// <summary>
@ -293,153 +293,152 @@ namespace MathNet.Numerics.LinearAlgebra
} }
/// <summary> /// <summary>
/// Computes the absolute value of a vector pointwise /// Computes the log of a vector pointwise
/// </summary> /// </summary>
/// <param name="x">The input vector</param> /// <param name="x">The input vector</param>
/// <returns></returns> /// <returns></returns>
public static Vector<T> Abs(Vector<T> x) public static Vector<T> Log(Vector<T> x)
{ {
return x.PointwiseAbs(); return x.PointwiseUnary(x.PointwiseLog);
} }
/// <summary> /// <summary>
/// Computes the acos of a vector pointwise /// Computes the log10 of a vector pointwise
/// </summary> /// </summary>
/// <param name="x">The input vector</param> /// <param name="x">The input vector</param>
/// <returns></returns> /// <returns></returns>
public static Vector<T> Acos(Vector<T> x) public static Vector<T> Log10(Vector<T> x)
{ {
return x.PointwiseAcos(); return x.PointwiseLog10();
} }
/// <summary> /// <summary>
/// Computes the asin of a vector pointwise /// Computes the sin of a vector pointwise
/// </summary> /// </summary>
/// <param name="x">The input vector</param> /// <param name="x">The input vector</param>
/// <returns></returns> /// <returns></returns>
public static Vector<T> Asin(Vector<T> x) public static Vector<T> Sin(Vector<T> x)
{ {
return x.PointwiseAsin(); return x.PointwiseSin();
} }
/// <summary> /// <summary>
/// Computes the atan of a vector pointwise /// Computes the cos of a vector pointwise
/// </summary> /// </summary>
/// <param name="x">The input vector</param> /// <param name="x">The input vector</param>
/// <returns></returns> /// <returns></returns>
public static Vector<T> Atan(Vector<T> x) public static Vector<T> Cos(Vector<T> x)
{ {
return x.PointwiseAtan(); return x.PointwiseCos();
} }
/// <summary> /// <summary>
/// Computes the ceiling of a vector pointwise /// Computes the tan of a vector pointwise
/// </summary> /// </summary>
/// <param name="x">The input vector</param> /// <param name="x">The input vector</param>
/// <returns></returns> /// <returns></returns>
public static Vector<T> Ceiling(Vector<T> x) public static Vector<T> Tan(Vector<T> x)
{ {
return x.PointwiseCeiling(); return x.PointwiseTan();
} }
/// <summary> /// <summary>
/// Computes the cos of a vector pointwise /// Computes the asin of a vector pointwise
/// </summary> /// </summary>
/// <param name="x">The input vector</param> /// <param name="x">The input vector</param>
/// <returns></returns> /// <returns></returns>
public static Vector<T> Cos(Vector<T> x) public static Vector<T> Asin(Vector<T> x)
{ {
return x.PointwiseCos(); return x.PointwiseAsin();
} }
/// <summary> /// <summary>
/// Computes the cosh of a vector pointwise /// Computes the acos of a vector pointwise
/// </summary> /// </summary>
/// <param name="x">The input vector</param> /// <param name="x">The input vector</param>
/// <returns></returns> /// <returns></returns>
public static Vector<T> Cosh(Vector<T> x) public static Vector<T> Acos(Vector<T> x)
{ {
return x.PointwiseCosh(); return x.PointwiseAcos();
} }
/// <summary> /// <summary>
/// Computes the floor of a vector pointwise /// Computes the atan of a vector pointwise
/// </summary> /// </summary>
/// <param name="x">The input vector</param> /// <param name="x">The input vector</param>
/// <returns></returns> /// <returns></returns>
public static Vector<T> Floor(Vector<T> x) public static Vector<T> Atan(Vector<T> x)
{ {
return x.PointwiseFloor(); return x.PointwiseAtan();
} }
/// <summary> /// <summary>
/// Computes the log10 of a vector pointwise /// Computes the sinh of a vector pointwise
/// </summary> /// </summary>
/// <param name="x">The input vector</param> /// <param name="x">The input vector</param>
/// <returns></returns> /// <returns></returns>
public static Vector<T> Log10(Vector<T> x) public static Vector<T> Sinh(Vector<T> x)
{ {
return x.PointwiseLog10(); return x.PointwiseSinh();
} }
/// <summary> /// <summary>
/// Computes the rounded value of a vector pointwise /// Computes the cosh of a vector pointwise
/// </summary> /// </summary>
/// <param name="x">The input vector</param> /// <param name="x">The input vector</param>
/// <returns></returns> /// <returns></returns>
public static Vector<T> Round(Vector<T> x) public static Vector<T> Cosh(Vector<T> x)
{ {
return x.PointwiseRound(); return x.PointwiseCosh();
} }
/// <summary> /// <summary>
/// Computes the sin of a vector pointwise /// Computes the tanh of a vector pointwise
/// </summary> /// </summary>
/// <param name="x">The input vector</param> /// <param name="x">The input vector</param>
/// <returns></returns> /// <returns></returns>
public static Vector<T> Sin(Vector<T> x) public static Vector<T> Tanh(Vector<T> x)
{ {
return x.PointwiseSin(); return x.PointwiseTanh();
} }
/// <summary> /// <summary>
/// Computes the sinh of a vector pointwise /// Computes the absolute value of a vector pointwise
/// </summary> /// </summary>
/// <param name="x">The input vector</param> /// <param name="x">The input vector</param>
/// <returns></returns> /// <returns></returns>
public static Vector<T> Sinh(Vector<T> x) public static Vector<T> Abs(Vector<T> x)
{ {
return x.PointwiseSinh(); return x.PointwiseAbs();
} }
/// <summary> /// <summary>
/// Computes the sqrt of a vector pointwise /// Computes the floor of a vector pointwise
/// </summary> /// </summary>
/// <param name="x">The input vector</param> /// <param name="x">The input vector</param>
/// <returns></returns> /// <returns></returns>
public static Vector<T> Sqrt(Vector<T> x) public static Vector<T> Floor(Vector<T> x)
{ {
return x.PointwiseSqrt(); return x.PointwiseFloor();
} }
/// <summary> /// <summary>
/// Computes the tan of a vector pointwise /// Computes the ceiling of a vector pointwise
/// </summary> /// </summary>
/// <param name="x">The input vector</param> /// <param name="x">The input vector</param>
/// <returns></returns> /// <returns></returns>
public static Vector<T> Tan(Vector<T> x) public static Vector<T> Ceiling(Vector<T> x)
{ {
return x.PointwiseTan(); return x.PointwiseCeiling();
} }
/// <summary> /// <summary>
/// Computes the tanh of a vector pointwise /// Computes the rounded value of a vector pointwise
/// </summary> /// </summary>
/// <param name="x">The input vector</param> /// <param name="x">The input vector</param>
/// <returns></returns> /// <returns></returns>
public static Vector<T> Tanh(Vector<T> x) public static Vector<T> Round(Vector<T> x)
{ {
return x.PointwiseTanh(); return x.PointwiseRound();
} }
} }
} }

Loading…
Cancel
Save