diff --git a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/IReadOnlyTensor.cs b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/IReadOnlyTensor.cs index 5472f389b96c3a..81e8b1dcf4f4c8 100644 --- a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/IReadOnlyTensor.cs +++ b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/IReadOnlyTensor.cs @@ -14,9 +14,9 @@ public interface IReadOnlyTensor /// The index of the element for which to get. /// The element that exists at . /// - /// Thrown when one of the following conditions is met: - /// * does not contain elements - /// * contains an element that is negative or greater than or equal to the corresponding dimension length + /// One of the following conditions is met: + /// * does not contain elements. + /// * contains an element that is negative or greater than or equal to the corresponding dimension length. /// object? this[params scoped ReadOnlySpan indexes] { get; } diff --git a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/IReadOnlyTensor_1.cs b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/IReadOnlyTensor_1.cs index c7159b33b05fcd..5a6a3cbc10e735 100644 --- a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/IReadOnlyTensor_1.cs +++ b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/IReadOnlyTensor_1.cs @@ -21,9 +21,9 @@ public interface IReadOnlyTensor : IReadOnlyTensor, IEnumerable /// The index of the element for which to get a reference. /// A reference to the element that exists at . /// - /// Thrown when one of the following conditions is met: - /// * does not contain elements - /// * contains an element that is negative or greater than or equal to the corresponding dimension length + /// One of the following conditions is met: + /// * does not contain elements. + /// * contains an element that is negative or greater than or equal to the corresponding dimension length. /// new ref readonly T this[params scoped ReadOnlySpan indexes] { get; } diff --git a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/ITensor.cs b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/ITensor.cs index f1adace43cb916..9d8162e51ddb45 100644 --- a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/ITensor.cs +++ b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/ITensor.cs @@ -14,9 +14,9 @@ public interface ITensor : IReadOnlyTensor /// The index of the element for which to get. /// The element that exists at . /// - /// Thrown when one of the following conditions is met: - /// * does not contain elements - /// * contains an element that is negative or greater than or equal to the corresponding dimension length + /// One of the following conditions is met: + /// * does not contain elements. + /// * contains an element that is negative or greater than or equal to the corresponding dimension length. /// new object? this[params scoped ReadOnlySpan indexes] { get; set; } diff --git a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/ReadOnlyTensorSpan_1.cs b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/ReadOnlyTensorSpan_1.cs index b070c5242da062..56c2d1a1469ade 100644 --- a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/ReadOnlyTensorSpan_1.cs +++ b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/ReadOnlyTensorSpan_1.cs @@ -48,10 +48,10 @@ public ReadOnlyTensorSpan(T[]? array) /// The lengths of the dimensions. If an empty span is provided, the created tensor will have a single dimension that is the same length as . /// Returns default when is null. /// - /// Thrown when one of the following conditions is met: - /// * is null and is not empty - /// * is not empty and contains an element that is either zero or negative - /// * is not empty and has a flattened length greater than .Length + /// One of the following conditions is met: + /// * is null and is not empty. + /// * is not empty and contains an element that is either zero or negative. + /// * is not empty and has a flattened length greater than .Length. /// public ReadOnlyTensorSpan(T[]? array, scoped ReadOnlySpan lengths) { @@ -67,13 +67,13 @@ public ReadOnlyTensorSpan(T[]? array, scoped ReadOnlySpan lengths) /// The strides of each dimension. If an empty span is provided, then strides will be automatically calculated from . /// Returns default when is null. /// - /// Thrown when one of the following conditions is met: - /// * is null and or is not empty - /// * is not empty and contains an element that is either zero or negative - /// * is not empty and has a flattened length greater than .Length - /// * is not empty and has a length different from - /// * is not empty and contains an element that is negative - /// * is not empty and contains an element that is zero in a non leading position + /// One of the following conditions is met: + /// * is null and or is not empty. + /// * is not empty and contains an element that is either zero or negative. + /// * is not empty and has a flattened length greater than .Length. + /// * is not empty and has a length different from . + /// * is not empty and contains an element that is negative. + /// * is not empty and contains an element that is zero in a non leading position. /// public ReadOnlyTensorSpan(T[]? array, scoped ReadOnlySpan lengths, scoped ReadOnlySpan strides) { @@ -90,14 +90,14 @@ public ReadOnlyTensorSpan(T[]? array, scoped ReadOnlySpan lengths, scoped /// The strides of each dimension. If an empty span is provided, then strides will be automatically calculated from . /// Returns default when is null. /// - /// Thrown when one of the following conditions is met: - /// * is null and or is not empty - /// * is not in range of - /// * is not empty and contains an element that is either zero or negative - /// * is not empty and has a flattened length greater than .Length - /// * is not empty and has a length different from - /// * is not empty and contains an element that is negative - /// * is not empty and contains an element that is zero in a non leading position + /// One of the following conditions is met: + /// * is null and or is not empty. + /// * is not in range of . + /// * is not empty and contains an element that is either zero or negative. + /// * is not empty and has a flattened length greater than .Length. + /// * is not empty and has a length different from . + /// * is not empty and contains an element that is negative. + /// * is not empty and contains an element that is zero in a non leading position. /// public ReadOnlyTensorSpan(T[]? array, int start, scoped ReadOnlySpan lengths, scoped ReadOnlySpan strides) { @@ -121,9 +121,9 @@ public ReadOnlyTensorSpan(ReadOnlySpan span) /// The target span. /// The lengths of the dimensions. If an empty span is provided, the created tensor span will have a single dimension that is the same length as . /// - /// Thrown when one of the following conditions is met: - /// * is not empty and contains an element that is either zero or negative - /// * is not empty and has a flattened length greater than .Length + /// One of the following conditions is met: + /// * is not empty and contains an element that is either zero or negative. + /// * is not empty and has a flattened length greater than .Length. /// public ReadOnlyTensorSpan(ReadOnlySpan span, scoped ReadOnlySpan lengths) { @@ -137,12 +137,12 @@ public ReadOnlyTensorSpan(ReadOnlySpan span, scoped ReadOnlySpan length /// The lengths of the dimensions. If an empty span is provided, the created tensor span will have a single dimension that is the same length as . /// The strides of each dimension. If an empty span is provided, then strides will be automatically calculated from . /// - /// Thrown when one of the following conditions is met: - /// * is not empty and contains an element that is either zero or negative - /// * is not empty and has a flattened length greater than .Length - /// * is not empty and has a length different from - /// * is not empty and contains an element that is negative - /// * is not empty and contains an element that is zero in a non leading position + /// One of the following conditions is met: + /// * is not empty and contains an element that is either zero or negative. + /// * is not empty and has a flattened length greater than .Length. + /// * is not empty and has a length different from . + /// * is not empty and contains an element that is negative. + /// * is not empty and contains an element that is zero in a non leading position. /// public ReadOnlyTensorSpan(ReadOnlySpan span, scoped ReadOnlySpan lengths, scoped ReadOnlySpan strides) { @@ -175,14 +175,14 @@ public ReadOnlyTensorSpan(Array? array) /// /// /// - /// Thrown when one of the following conditions is met: - /// * is null and or is not empty - /// * is not in range of - /// * is not empty and contains an element that is either zero or negative - /// * is not empty and has a flattened length greater than .Length - /// * is not empty and has a length different from - /// * is not empty and contains an element that is negative - /// * is not empty and contains an element that is zero in a non leading position + /// One of the following conditions is met: + /// * is null and or is not empty. + /// * is not in range of . + /// * is not empty and contains an element that is either zero or negative. + /// * is not empty and has a flattened length greater than .Length. + /// * is not empty and has a length different from . + /// * is not empty and contains an element that is negative. + /// * is not empty and contains an element that is zero in a non leading position. /// public ReadOnlyTensorSpan(Array? array, scoped ReadOnlySpan start, scoped ReadOnlySpan lengths, scoped ReadOnlySpan strides) { @@ -211,11 +211,11 @@ public unsafe ReadOnlyTensorSpan(T* data, nint dataLength) /// The lengths of the dimensions. If an empty span is provided, the created tensor span will have a single dimension that is the same length as . /// Returns default when is null. /// - /// Thrown when one of the following conditions is met: - /// * is null and is not zero - /// * is null and - /// * is not empty and contains an element that is either zero or negative - /// * is not empty and has a flattened length greater than + /// One of the following conditions is met: + /// * is null and is not zero. + /// * is null and . + /// * is not empty and contains an element that is either zero or negative. + /// * is not empty and has a flattened length greater than . /// [CLSCompliant(false)] public unsafe ReadOnlyTensorSpan(T* data, nint dataLength, scoped ReadOnlySpan lengths) @@ -231,14 +231,14 @@ public unsafe ReadOnlyTensorSpan(T* data, nint dataLength, scoped ReadOnlySpanThe strides of each dimension. If an empty span is provided, then strides will be automatically calculated from . /// Returns default when is null. /// - /// Thrown when one of the following conditions is met: - /// * is null and is not zero - /// * is null and or is not empty - /// * is not empty and contains an element that is either zero or negative - /// * is not empty and has a flattened length greater than - /// * is not empty and has a length different from - /// * is not empty and contains an element that is negative - /// * is not empty and contains an element that is zero in a non leading position + /// One of the following conditions is met: + /// * is null and is not zero. + /// * is null and or is not empty. + /// * is not empty and contains an element that is either zero or negative. + /// * is not empty and has a flattened length greater than . + /// * is not empty and has a length different from . + /// * is not empty and contains an element that is negative. + /// * is not empty and contains an element that is zero in a non leading position. /// [CLSCompliant(false)] public unsafe ReadOnlyTensorSpan(T* data, nint dataLength, scoped ReadOnlySpan lengths, scoped ReadOnlySpan strides) diff --git a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/Tensor.cs b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/Tensor.cs index ee2fa5a382f44a..233c2d5103492a 100644 --- a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/Tensor.cs +++ b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/Tensor.cs @@ -67,7 +67,7 @@ public static Tensor Broadcast(scoped in ReadOnlyTensorSpan source, sco /// /// Input . /// of the desired new shape. - /// Thrown when the shapes are not broadcast compatible. + /// The shapes are not broadcast compatible. public static Tensor Broadcast(scoped in ReadOnlyTensorSpan source, scoped ReadOnlySpan lengths) { TensorOperation.ValidateCompatibility(source, lengths); @@ -4203,7 +4203,7 @@ public static ref readonly TensorSpan LogP1(scoped in ReadOnlyTensorSpanSearches for the largest number in the specified tensor. - /// The input .. + /// The input . public static T Max(scoped in ReadOnlyTensorSpan x) where T : INumber { @@ -4266,7 +4266,7 @@ public static ref readonly TensorSpan Max(scoped in ReadOnlyTensorSpan #region MaxMagnitude /// Searches for the number with the largest magnitude in the specified tensor. - /// The input .. + /// The input . public static T MaxMagnitude(scoped in ReadOnlyTensorSpan x) where T : INumber { @@ -4329,7 +4329,7 @@ public static ref readonly TensorSpan MaxMagnitude(scoped in ReadOnlyTenso #region MaxMagnitudeNumber /// Searches for the number with the largest magnitude in the specified tensor. - /// The input .. + /// The input . public static T MaxMagnitudeNumber(scoped in ReadOnlyTensorSpan x) where T : INumberBase { @@ -4392,7 +4392,7 @@ public static ref readonly TensorSpan MaxMagnitudeNumber(scoped in ReadOnl #region MaxNumber /// Searches for the largest number in the specified tensor. - /// The input .. + /// The input . public static T MaxNumber(scoped in ReadOnlyTensorSpan x) where T : INumber { @@ -4454,8 +4454,8 @@ public static ref readonly TensorSpan MaxNumber(scoped in ReadOnlyTensorSp #endregion #region Min - /// Searches for the largest number in the specified tensor. - /// The input .. + /// Searches for the smallest number in the specified tensor. + /// The input . public static T Min(scoped in ReadOnlyTensorSpan x) where T : INumber { @@ -4469,7 +4469,7 @@ public static T Min(scoped in ReadOnlyTensorSpan x) return result; } - /// Computes the element-wise Minimum of the numbers in the specified tensors. + /// Computes the element-wise minimum of the numbers in the specified tensors. /// The first tensor, represented as a span. /// The second tensor, represented as a span. public static Tensor Min(in ReadOnlyTensorSpan x, in ReadOnlyTensorSpan y) @@ -4480,7 +4480,7 @@ public static Tensor Min(in ReadOnlyTensorSpan x, in ReadOnlyTensorSpan return output; } - /// Computes the element-wise Minimum of the numbers in the specified tensors. + /// Computes the element-wise minimum of the numbers in the specified tensors. /// The first tensor, represented as a span. /// The second tensor, represented as a span. /// The destination tensor, represented as a span. @@ -4492,7 +4492,7 @@ public static ref readonly TensorSpan Min(scoped in ReadOnlyTensorSpan return ref destination; } - /// Computes the element-wise Minimum of the numbers in the specified tensors. + /// Computes the element-wise minimum of the numbers in the specified tensors. /// The first tensor, represented as a span. /// The second tensor, represented as a span. public static Tensor Min(in ReadOnlyTensorSpan x, T y) @@ -4503,7 +4503,7 @@ public static Tensor Min(in ReadOnlyTensorSpan x, T y) return destination; } - /// Computes the element-wise Minimum of the numbers in the specified tensors. + /// Computes the element-wise minimum of the numbers in the specified tensors. /// The first tensor, represented as a span. /// The second tensor, represented as a span. /// The destination tensor, represented as a span. @@ -4517,8 +4517,8 @@ public static ref readonly TensorSpan Min(scoped in ReadOnlyTensorSpan #endregion #region MinMagnitude - /// Searches for the number with the largest magnitude in the specified tensor. - /// The input .. + /// Searches for the number with the smallest magnitude in the specified tensor. + /// The input . public static T MinMagnitude(scoped in ReadOnlyTensorSpan x) where T : INumber { @@ -4532,7 +4532,7 @@ public static T MinMagnitude(scoped in ReadOnlyTensorSpan x) return result; } - /// Computes the element-wise number with the largest magnitude in the specified tensors. + /// Computes the element-wise number with the smallest magnitude in the specified tensors. /// The first tensor, represented as a span. /// The second tensor, represented as a span. public static Tensor MinMagnitude(in ReadOnlyTensorSpan x, in ReadOnlyTensorSpan y) @@ -4543,7 +4543,7 @@ public static Tensor MinMagnitude(in ReadOnlyTensorSpan x, in ReadOnlyT return destination; } - /// Computes the element-wise number with the largest magnitude in the specified tensors. + /// Computes the element-wise number with the smallest magnitude in the specified tensors. /// The first tensor, represented as a span. /// The second tensor, represented as a span. /// The destination tensor, represented as a span. @@ -4555,7 +4555,7 @@ public static ref readonly TensorSpan MinMagnitude(scoped in ReadOnlyTenso return ref destination; } - /// Computes the element-wise number with the largest magnitude in the specified tensors. + /// Computes the element-wise number with the smallest magnitude in the specified tensors. /// The first tensor, represented as a span. /// The second tensor, represented as a span. public static Tensor MinMagnitude(in ReadOnlyTensorSpan x, T y) @@ -4566,7 +4566,7 @@ public static Tensor MinMagnitude(in ReadOnlyTensorSpan x, T y) return destination; } - /// Computes the element-wise number with the largest magnitude in the specified tensors. + /// Computes the element-wise number with the smallest magnitude in the specified tensors. /// The first tensor, represented as a span. /// The second tensor, represented as a span. /// The destination tensor, represented as a span. @@ -4580,8 +4580,8 @@ public static ref readonly TensorSpan MinMagnitude(scoped in ReadOnlyTenso #endregion #region MinMagnitudeNumber - /// Searches for the number with the largest magnitude in the specified tensor. - /// The input .. + /// Searches for the number with the smallest magnitude in the specified tensor. + /// The input . public static T MinMagnitudeNumber(scoped in ReadOnlyTensorSpan x) where T : INumberBase { @@ -4595,7 +4595,7 @@ public static T MinMagnitudeNumber(scoped in ReadOnlyTensorSpan x) return result; } - /// Computes the element-wise number with the largest magnitude in the specified tensors. + /// Computes the element-wise number with the smallest magnitude in the specified tensors. /// The first tensor, represented as a span. /// The second tensor, represented as a span. public static Tensor MinMagnitudeNumber(in ReadOnlyTensorSpan x, in ReadOnlyTensorSpan y) @@ -4606,7 +4606,7 @@ public static Tensor MinMagnitudeNumber(in ReadOnlyTensorSpan x, in Rea return destination; } - /// Computes the element-wise number with the largest magnitude in the specified tensors. + /// Computes the element-wise number with the smallest magnitude in the specified tensors. /// The first tensor, represented as a span. /// The second tensor, represented as a span. /// The destination tensor, represented as a span. @@ -4618,7 +4618,7 @@ public static ref readonly TensorSpan MinMagnitudeNumber(scoped in ReadOnl return ref destination; } - /// Computes the element-wise number with the largest magnitude in the specified tensors. + /// Computes the element-wise number with the smallest magnitude in the specified tensors. /// The first tensor, represented as a span. /// The second tensor, represented as a span. public static Tensor MinMagnitudeNumber(in ReadOnlyTensorSpan x, T y) @@ -4629,7 +4629,7 @@ public static Tensor MinMagnitudeNumber(in ReadOnlyTensorSpan x, T y) return destination; } - /// Computes the element-wise number with the largest magnitude in the specified tensors. + /// Computes the element-wise number with the smallest magnitude in the specified tensors. /// The first tensor, represented as a span. /// The second tensor, represented as a span. /// The destination tensor, represented as a span. @@ -4643,8 +4643,8 @@ public static ref readonly TensorSpan MinMagnitudeNumber(scoped in ReadOnl #endregion #region MinNumber - /// Searches for the largest number in the specified tensor. - /// The input .. + /// Searches for the smallest number in the specified tensor. + /// The input . public static T MinNumber(scoped in ReadOnlyTensorSpan x) where T : INumber { @@ -4658,7 +4658,7 @@ public static T MinNumber(scoped in ReadOnlyTensorSpan x) return result; } - /// Computes the element-wise Minimum of the numbers in the specified tensors. + /// Computes the element-wise minimum of the numbers in the specified tensors. /// The first tensor, represented as a span. /// The second tensor, represented as a span. public static Tensor MinNumber(in ReadOnlyTensorSpan x, in ReadOnlyTensorSpan y) @@ -4669,7 +4669,7 @@ public static Tensor MinNumber(in ReadOnlyTensorSpan x, in ReadOnlyTens return destination; } - /// Computes the element-wise Minimum of the numbers in the specified tensors. + /// Computes the element-wise minimum of the numbers in the specified tensors. /// The first tensor, represented as a span. /// The second tensor, represented as a span. /// The destination tensor, represented as a span. @@ -4681,7 +4681,7 @@ public static ref readonly TensorSpan MinNumber(scoped in ReadOnlyTensorSp return ref destination; } - /// Computes the element-wise Minimum of the numbers in the specified tensors. + /// Computes the element-wise minimum of the numbers in the specified tensors. /// The first tensor, represented as a span. /// The second tensor, represented as a span. public static Tensor MinNumber(in ReadOnlyTensorSpan x, T y) @@ -4692,7 +4692,7 @@ public static Tensor MinNumber(in ReadOnlyTensorSpan x, T y) return destination; } - /// Computes the element-wise Minimum of the numbers in the specified tensors. + /// Computes the element-wise minimum of the numbers in the specified tensors. /// The first tensor, represented as a span. /// The second tensor, represented as a span. /// The destination tensor, represented as a span.