diff --git a/src/Numerics/LinearAlgebra/Generic/Vector.cs b/src/Numerics/LinearAlgebra/Generic/Vector.cs index cb477ff2..df861e1f 100644 --- a/src/Numerics/LinearAlgebra/Generic/Vector.cs +++ b/src/Numerics/LinearAlgebra/Generic/Vector.cs @@ -144,9 +144,7 @@ namespace MathNet.Numerics.LinearAlgebra.Generic /// /// Returns a deep-copy clone of the vector. /// - /// - /// A deep-copy clone of the vector. - /// + /// A deep-copy clone of the vector. public Vector Clone() { var result = CreateVector(Count); @@ -157,15 +155,9 @@ namespace MathNet.Numerics.LinearAlgebra.Generic /// /// Copies the values of this vector into the target vector. /// - /// - /// The vector to copy elements into. - /// - /// - /// If is . - /// - /// - /// If is not the same size as this vector. - /// + /// The vector to copy elements into. + /// If is . + /// If is not the same size as this vector. public void CopyTo(Vector target) { if (target == null) @@ -179,18 +171,10 @@ namespace MathNet.Numerics.LinearAlgebra.Generic /// /// Copies the requested elements from this vector to another. /// - /// - /// The vector to copy the elements to. - /// - /// - /// The element to start copying from. - /// - /// - /// The element to start copying to. - /// - /// - /// The number of elements to copy. - /// + /// The vector to copy the elements to. + /// The element to start copying from. + /// The element to start copying to. + /// The number of elements to copy. public void CopySubVectorTo(Vector destination, int sourceIndex, int targetIndex, int count) { if (destination == null) @@ -212,27 +196,17 @@ namespace MathNet.Numerics.LinearAlgebra.Generic /// Creates a matrix with the given dimensions using the same storage type /// as this vector. /// - /// - /// The number of rows. - /// - /// - /// The number of columns. - /// - /// - /// A matrix with the given dimensions. - /// + /// The number of rows. + /// The number of columns. + /// A matrix with the given dimensions. public abstract Matrix CreateMatrix(int rows, int columns); /// /// Creates a Vector of the given size using the same storage type /// as this vector. /// - /// - /// The size of the Vector to create. - /// - /// - /// The new Vector. - /// + /// The size of the Vector to create. + /// The new Vector. public abstract Vector CreateVector(int size); #region Elementary operations @@ -240,9 +214,7 @@ namespace MathNet.Numerics.LinearAlgebra.Generic /// /// Adds a scalar to each element of the vector. /// - /// - /// The scalar to add. - /// + /// The scalar to add. /// A copy of the vector with the scalar added. public Vector Add(T scalar) { @@ -259,18 +231,10 @@ namespace MathNet.Numerics.LinearAlgebra.Generic /// /// Adds a scalar to each element of the vector and stores the result in the result vector. /// - /// - /// The scalar to add. - /// - /// - /// The vector to store the result of the addition. - /// - /// - /// If the result vector is . - /// - /// - /// If this vector and are not the same size. - /// + /// The scalar to add. + /// The vector to store the result of the addition. + /// If the result vector is . + /// If this vector and are not the same size. public void Add(T scalar, Vector result) { if (result == null) @@ -295,20 +259,14 @@ namespace MathNet.Numerics.LinearAlgebra.Generic /// /// Adds a scalar to each element of the vector and stores the result in the result vector. /// - /// - /// The scalar to add. - /// - /// - /// The vector to store the result of the addition. - /// + /// The scalar to add. + /// The vector to store the result of the addition. protected abstract void DoAdd(T scalar, Vector result); /// /// Returns a copy of this vector. /// - /// - /// This vector. - /// + /// This vector. /// /// Added as an alternative to the unary addition operator. /// @@ -320,16 +278,10 @@ namespace MathNet.Numerics.LinearAlgebra.Generic /// /// Adds another vector to this vector. /// - /// - /// The vector to add to this one. - /// + /// The vector to add to this one. /// A new vector containing the sum of both vectors. - /// - /// If the other vector is . - /// - /// - /// If this vector and are not the same size. - /// + /// If the other vector is . + /// If this vector and are not the same size. public Vector Add(Vector other) { if (other == null) @@ -350,24 +302,12 @@ namespace MathNet.Numerics.LinearAlgebra.Generic /// /// Adds another vector to this vector and stores the result into the result vector. /// - /// - /// The vector to add to this one. - /// - /// - /// The vector to store the result of the addition. - /// - /// - /// If the other vector is . - /// - /// - /// If the result vector is . - /// - /// - /// If this vector and are not the same size. - /// - /// - /// If this vector and are not the same size. - /// + /// The vector to add to this one. + /// The vector to store the result of the addition. + /// If the other vector is . + /// If the result vector is . + /// If this vector and are not the same size. + /// If this vector and are not the same size. public void Add(Vector other, Vector result) { if (result == null) @@ -386,20 +326,14 @@ namespace MathNet.Numerics.LinearAlgebra.Generic /// /// Adds another vector to this vector and stores the result into the result vector. /// - /// - /// The vector to add to this one. - /// - /// - /// The vector to store the result of the addition. - /// + /// The vector to add to this one. + /// The vector to store the result of the addition. protected abstract void DoAdd(Vector other, Vector result); /// /// Subtracts a scalar from each element of the vector. /// - /// - /// The scalar to subtract. - /// + /// The scalar to subtract. /// A new vector containing the subtraction of this vector and the scalar. public Vector Subtract(T scalar) { @@ -416,18 +350,10 @@ namespace MathNet.Numerics.LinearAlgebra.Generic /// /// Subtracts a scalar from each element of the vector and stores the result in the result vector. /// - /// - /// The scalar to subtract. - /// - /// - /// The vector to store the result of the subtraction. - /// - /// - /// If the result vector is . - /// - /// - /// If this vector and are not the same size. - /// + /// The scalar to subtract. + /// The vector to store the result of the subtraction. + /// If the result vector is . + /// If this vector and are not the same size. public void Subtract(T scalar, Vector result) { if (result == null) @@ -452,38 +378,24 @@ namespace MathNet.Numerics.LinearAlgebra.Generic /// /// Subtracts a scalar from each element of the vector and stores the result in the result vector. /// - /// - /// The scalar to subtract. - /// - /// - /// The vector to store the result of the subtraction. - /// + /// The scalar to subtract. + /// The vector to store the result of the subtraction. protected abstract void DoSubtract(T scalar, Vector result); /// /// Returns a negated vector. /// - /// - /// The negated vector. - /// - /// - /// Added as an alternative to the unary negation operator. - /// + /// The negated vector. + /// Added as an alternative to the unary negation operator. public abstract Vector Negate(); /// /// Subtracts another vector from this vector. /// - /// - /// The vector to subtract from this one. - /// + /// The vector to subtract from this one. /// A new vector containing the subtraction of the the two vectors. - /// - /// If the other vector is . - /// - /// - /// If this vector and are not the same size. - /// + /// If the other vector is . + /// If this vector and are not the same size. public Vector Subtract(Vector other) { if (other == null) @@ -504,24 +416,12 @@ namespace MathNet.Numerics.LinearAlgebra.Generic /// /// Subtracts another vector to this vector and stores the result into the result vector. /// - /// - /// The vector to subtract from this one. - /// - /// - /// The vector to store the result of the subtraction. - /// - /// - /// If the other vector is . - /// - /// - /// If the result vector is . - /// - /// - /// If this vector and are not the same size. - /// - /// - /// If this vector and are not the same size. - /// + /// The vector to subtract from this one. + /// The vector to store the result of the subtraction. + /// If the other vector is . + /// If the result vector is . + /// If this vector and are not the same size. + /// If this vector and are not the same size. public void Subtract(Vector other, Vector result) { if (result == null) @@ -540,20 +440,14 @@ namespace MathNet.Numerics.LinearAlgebra.Generic /// /// Subtracts another vector to this vector and stores the result into the result vector. /// - /// - /// The vector to subtract from this one. - /// - /// - /// The vector to store the result of the subtraction. - /// + /// The vector to subtract from this one. + /// The vector to store the result of the subtraction. protected abstract void DoSubtract(Vector other, Vector result); /// /// Multiplies a scalar to each element of the vector. /// - /// - /// The scalar to multiply. - /// + /// The scalar to multiply. /// A new vector that is the multiplication of the vector and the scalar. public Vector Multiply(T scalar) { @@ -575,18 +469,10 @@ namespace MathNet.Numerics.LinearAlgebra.Generic /// /// Multiplies a scalar to each element of the vector and stores the result in the result vector. /// - /// - /// The scalar to multiply. - /// - /// - /// The vector to store the result of the multiplication. - /// - /// - /// If the result vector is . - /// - /// - /// If this vector and are not the same size. - /// + /// The scalar to multiply. + /// The vector to store the result of the multiplication. + /// If the result vector is . + /// If this vector and are not the same size. public void Multiply(T scalar, Vector result) { if (result == null) @@ -617,29 +503,17 @@ namespace MathNet.Numerics.LinearAlgebra.Generic /// /// Multiplies a scalar to each element of the vector and stores the result in the result vector. /// - /// - /// The scalar to multiply. - /// - /// - /// The vector to store the result of the multiplication. - /// + /// The scalar to multiply. + /// The vector to store the result of the multiplication. protected abstract void DoMultiply(T scalar, Vector result); /// /// Computes the dot product between this vector and another vector. /// - /// - /// The other vector to add. - /// - /// s - /// The result of the addition. - /// - /// - /// If is not of the same size. - /// - /// - /// If is . - /// + /// The other vector to add. + /// The result of the addition. + /// If is not of the same size. + /// If is . public T DotProduct(Vector other) { if (other == null) @@ -658,20 +532,14 @@ namespace MathNet.Numerics.LinearAlgebra.Generic /// /// Computes the dot product between this vector and another vector. /// - /// - /// The other vector to add. - /// - /// s - /// The result of the addition. - /// + /// The other vector to add. + /// The result of the addition. protected abstract T DoDotProduct(Vector other); /// /// Divides each element of the vector by a scalar. /// - /// - /// The scalar to divide with. - /// + /// The scalar to divide with. /// A new vector that is the division of the vector and the scalar. public Vector Divide(T scalar) { @@ -688,18 +556,10 @@ namespace MathNet.Numerics.LinearAlgebra.Generic /// /// Divides each element of the vector by a scalar and stores the result in the result vector. /// - /// - /// The scalar to divide with. - /// - /// - /// The vector to store the result of the division. - /// - /// - /// If the result vector is . - /// - /// - /// If this vector and are not the same size. - /// + /// The scalar to divide with. + /// The vector to store the result of the division. + /// If the result vector is . + /// If this vector and are not the same size. public void Divide(T scalar, Vector result) { if (result == null) @@ -724,12 +584,8 @@ namespace MathNet.Numerics.LinearAlgebra.Generic /// /// Divides each element of the vector by a scalar and stores the result in the result vector. /// - /// - /// The scalar to divide with. - /// - /// - /// The vector to store the result of the division. - /// + /// The scalar to divide with. + /// The vector to store the result of the division. protected abstract void DoDivide(T scalar, Vector result); /// @@ -858,12 +714,8 @@ namespace MathNet.Numerics.LinearAlgebra.Generic /// /// Pointwise divide this vector with another vector and stores the result into the result vector. /// - /// - /// The vector to pointwise divide this one by. - /// - /// - /// The result of the division. - /// + /// The vector to pointwise divide this one by. + /// The result of the division. protected abstract void DoPointwiseDivide(Vector other, Vector result); ///