|
|
@ -339,7 +339,7 @@ namespace MathNet.Numerics.LinearAlgebra.Generic |
|
|
/// <item><paramref name="columnIndex"/> is negative,
|
|
|
/// <item><paramref name="columnIndex"/> is negative,
|
|
|
/// or greater than or equal to the number of columns.</item>
|
|
|
/// or greater than or equal to the number of columns.</item>
|
|
|
/// <item><c>(columnIndex + length) >= Columns.</c></item></list></exception>
|
|
|
/// <item><c>(columnIndex + length) >= Columns.</c></item></list></exception>
|
|
|
/// <exception cref="ArgumentException">If <paramref name="length"/> is not positive.</exception>
|
|
|
/// <exception cref="ArgumentOutOfRangeException">If <paramref name="length"/> is not positive.</exception>
|
|
|
public virtual Vector<T> Row(int rowIndex, int columnIndex, int length) |
|
|
public virtual Vector<T> Row(int rowIndex, int columnIndex, int length) |
|
|
{ |
|
|
{ |
|
|
var ret = CreateVector(length); |
|
|
var ret = CreateVector(length); |
|
|
@ -361,7 +361,7 @@ namespace MathNet.Numerics.LinearAlgebra.Generic |
|
|
/// or greater than or equal to the number of rows.</exception>
|
|
|
/// or greater than or equal to the number of rows.</exception>
|
|
|
/// <exception cref="ArgumentOutOfRangeException">If <paramref name="columnIndex"/> + <paramref name="length"/>
|
|
|
/// <exception cref="ArgumentOutOfRangeException">If <paramref name="columnIndex"/> + <paramref name="length"/>
|
|
|
/// is greater than or equal to the number of rows.</exception>
|
|
|
/// is greater than or equal to the number of rows.</exception>
|
|
|
/// <exception cref="ArgumentException">If <paramref name="length"/> is not positive.</exception>
|
|
|
/// <exception cref="ArgumentOutOfRangeException">If <paramref name="length"/> is not positive.</exception>
|
|
|
/// <exception cref="ArgumentOutOfRangeException">If <strong>result.Count < length</strong>.</exception>
|
|
|
/// <exception cref="ArgumentOutOfRangeException">If <strong>result.Count < length</strong>.</exception>
|
|
|
public virtual void Row(int rowIndex, int columnIndex, int length, Vector<T> result) |
|
|
public virtual void Row(int rowIndex, int columnIndex, int length, Vector<T> result) |
|
|
{ |
|
|
{ |
|
|
@ -387,12 +387,12 @@ namespace MathNet.Numerics.LinearAlgebra.Generic |
|
|
|
|
|
|
|
|
if (length < 1) |
|
|
if (length < 1) |
|
|
{ |
|
|
{ |
|
|
throw new ArgumentException(Resources.ArgumentMustBePositive, "length"); |
|
|
throw new ArgumentOutOfRangeException("length", Resources.ArgumentMustBePositive); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (result.Count < length) |
|
|
if (result.Count < length) |
|
|
{ |
|
|
{ |
|
|
throw new ArgumentException(Resources.ArgumentVectorsSameLength, "result"); |
|
|
throw new ArgumentOutOfRangeException("result", Resources.ArgumentVectorsSameLength); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
for (int i = columnIndex, j = 0; i < columnIndex + length; i++, j++) |
|
|
for (int i = columnIndex, j = 0; i < columnIndex + length; i++, j++) |
|
|
@ -443,7 +443,7 @@ namespace MathNet.Numerics.LinearAlgebra.Generic |
|
|
/// or greater than or equal to the number of rows.</item>
|
|
|
/// or greater than or equal to the number of rows.</item>
|
|
|
/// <item><c>(rowIndex + length) >= Rows.</c></item></list>
|
|
|
/// <item><c>(rowIndex + length) >= Rows.</c></item></list>
|
|
|
/// </exception>
|
|
|
/// </exception>
|
|
|
/// <exception cref="ArgumentException">If <paramref name="length"/> is not positive.</exception>
|
|
|
/// <exception cref="ArgumentOutOfRangeException">If <paramref name="length"/> is not positive.</exception>
|
|
|
public virtual Vector<T> Column(int columnIndex, int rowIndex, int length) |
|
|
public virtual Vector<T> Column(int columnIndex, int rowIndex, int length) |
|
|
{ |
|
|
{ |
|
|
var result = CreateVector(length); |
|
|
var result = CreateVector(length); |
|
|
@ -465,7 +465,7 @@ namespace MathNet.Numerics.LinearAlgebra.Generic |
|
|
/// or greater than or equal to the number of rows.</exception>
|
|
|
/// or greater than or equal to the number of rows.</exception>
|
|
|
/// <exception cref="ArgumentOutOfRangeException">If <paramref name="rowIndex"/> + <paramref name="length"/>
|
|
|
/// <exception cref="ArgumentOutOfRangeException">If <paramref name="rowIndex"/> + <paramref name="length"/>
|
|
|
/// is greater than or equal to the number of rows.</exception>
|
|
|
/// is greater than or equal to the number of rows.</exception>
|
|
|
/// <exception cref="ArgumentException">If <paramref name="length"/> is not positive.</exception>
|
|
|
/// <exception cref="ArgumentOutOfRangeException">If <paramref name="length"/> is not positive.</exception>
|
|
|
/// <exception cref="ArgumentOutOfRangeException">If <strong>result.Count < length</strong>.</exception>
|
|
|
/// <exception cref="ArgumentOutOfRangeException">If <strong>result.Count < length</strong>.</exception>
|
|
|
public virtual void Column(int columnIndex, int rowIndex, int length, Vector<T> result) |
|
|
public virtual void Column(int columnIndex, int rowIndex, int length, Vector<T> result) |
|
|
{ |
|
|
{ |
|
|
@ -491,12 +491,12 @@ namespace MathNet.Numerics.LinearAlgebra.Generic |
|
|
|
|
|
|
|
|
if (length < 1) |
|
|
if (length < 1) |
|
|
{ |
|
|
{ |
|
|
throw new ArgumentException(Resources.ArgumentMustBePositive, "length"); |
|
|
throw new ArgumentOutOfRangeException("length", Resources.ArgumentMustBePositive); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (result.Count < length) |
|
|
if (result.Count < length) |
|
|
{ |
|
|
{ |
|
|
throw new ArgumentException(Resources.ArgumentVectorsSameLength, "result"); |
|
|
throw new ArgumentOutOfRangeException("result", Resources.ArgumentVectorsSameLength); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
for (int i = rowIndex, j = 0; i < rowIndex + length; i++, j++) |
|
|
for (int i = rowIndex, j = 0; i < rowIndex + length; i++, j++) |
|
|
|