From f3ab53215df0ab1cf2a0d5ec6e0eae2b853b18ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anta=CC=83o=20Almada?= Date: Tue, 27 Feb 2024 21:57:03 +0000 Subject: [PATCH] Make operators public --- .../NetFabric.Numerics.Tensors.csproj | 1 + .../Operations/LessThanOrEqual.cs | 2 +- .../Operators/AbsOperator.cs | 4 +- .../Operators/AddMultiplyOperator.cs | 4 +- .../Operators/AdditionOperators.cs | 6 +- .../Operators/BitwiseOperators.cs | 12 ++-- .../Operators/ComparisonOperators.cs | 58 +++++++++---------- .../Operators/DecrementOperators.cs | 6 +- .../Operators/DivisionOperators.cs | 6 +- .../Operators/EqualityOperators.cs | 6 +- .../Operators/ExponentialOperators.cs | 16 ++--- .../FloatingPointIeee754Operators.cs | 22 +++---- .../Operators/FloatingPointOperators.cs | 24 ++++---- .../Operators/HyperbolicOperators.cs | 14 ++--- .../Operators/IdentityOperator.cs | 4 +- .../Operators/IncrementOperators.cs | 6 +- .../Operators/LogarithmicOperators.cs | 16 ++--- .../Operators/MaxOperator.cs | 10 ++-- .../Operators/MinOperator.cs | 10 ++-- .../Operators/ModulusOperators.cs | 4 +- .../Operators/MultiplyAddOperator.cs | 4 +- .../Operators/MultiplyDivideOperator.cs | 4 +- .../Operators/MultiplyOperators.cs | 8 +-- .../Operators/PowerFunctionsOperators.cs | 8 +-- .../Operators/ProductOperator.cs | 4 +- .../Operators/RootFunctionsOperators.cs | 10 ++-- .../Operators/ShiftLeftOperator.cs | 24 ++++---- .../Operators/ShiftRightAritmeticOperator.cs | 14 ++--- .../Operators/ShiftRightLogicalOperator.cs | 24 ++++---- .../Operators/SubtractionOperators.cs | 6 +- .../Operators/SumOperator.cs | 4 +- .../Operators/TrigonometricOperators.cs | 30 +++++----- .../Operators/UnaryNegationOperator.cs | 6 +- 33 files changed, 189 insertions(+), 188 deletions(-) diff --git a/src/NetFabric.Numerics.Tensors/NetFabric.Numerics.Tensors.csproj b/src/NetFabric.Numerics.Tensors/NetFabric.Numerics.Tensors.csproj index 45ef114..f584120 100644 --- a/src/NetFabric.Numerics.Tensors/NetFabric.Numerics.Tensors.csproj +++ b/src/NetFabric.Numerics.Tensors/NetFabric.Numerics.Tensors.csproj @@ -43,6 +43,7 @@ + diff --git a/src/NetFabric.Numerics.Tensors/Operations/LessThanOrEqual.cs b/src/NetFabric.Numerics.Tensors/Operations/LessThanOrEqual.cs index d4f0412..b8895d8 100644 --- a/src/NetFabric.Numerics.Tensors/Operations/LessThanOrEqual.cs +++ b/src/NetFabric.Numerics.Tensors/Operations/LessThanOrEqual.cs @@ -33,7 +33,7 @@ public static void LessThanOrEqual(ReadOnlySpan x, ValueTuple y, public static void LessThanOrEqual(ReadOnlySpan x, ValueTuple y, Span destination) => Tensor.Apply(x, y, destination); - public static void LessThanOrEqual(ReadOnlySpan x, ReadOnlySpan y, Span destination) + public static void LessThanOrEqual(ReadOnlySpan x, ReadOnlySpan y, Span destination) => Tensor.Apply(x, y, destination); // long diff --git a/src/NetFabric.Numerics.Tensors/Operators/AbsOperator.cs b/src/NetFabric.Numerics.Tensors/Operators/AbsOperator.cs index 8177f1a..65e2633 100644 --- a/src/NetFabric.Numerics.Tensors/Operators/AbsOperator.cs +++ b/src/NetFabric.Numerics.Tensors/Operators/AbsOperator.cs @@ -1,6 +1,6 @@ -namespace NetFabric.Numerics.Tensors; +namespace NetFabric.Numerics.Tensors.Operators; -readonly struct AbsOperator +public readonly struct AbsOperator : IUnaryOperator where T : struct, INumberBase { diff --git a/src/NetFabric.Numerics.Tensors/Operators/AddMultiplyOperator.cs b/src/NetFabric.Numerics.Tensors/Operators/AddMultiplyOperator.cs index bbafd6c..b411010 100644 --- a/src/NetFabric.Numerics.Tensors/Operators/AddMultiplyOperator.cs +++ b/src/NetFabric.Numerics.Tensors/Operators/AddMultiplyOperator.cs @@ -1,6 +1,6 @@ -namespace NetFabric.Numerics.Tensors; +namespace NetFabric.Numerics.Tensors.Operators; -readonly struct AddMultiplyOperator +public readonly struct AddMultiplyOperator : ITernaryOperator where T : struct, IAdditionOperators, IMultiplyOperators { diff --git a/src/NetFabric.Numerics.Tensors/Operators/AdditionOperators.cs b/src/NetFabric.Numerics.Tensors/Operators/AdditionOperators.cs index be7f77c..f7b6501 100644 --- a/src/NetFabric.Numerics.Tensors/Operators/AdditionOperators.cs +++ b/src/NetFabric.Numerics.Tensors/Operators/AdditionOperators.cs @@ -1,6 +1,6 @@ -namespace NetFabric.Numerics.Tensors; +namespace NetFabric.Numerics.Tensors.Operators; -readonly struct AddOperator +public readonly struct AddOperator : IBinaryOperator where T : struct, IAdditionOperators { @@ -13,7 +13,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Vector => x + y; } -readonly struct CheckedAddOperator +public readonly struct CheckedAddOperator : IBinaryOperator where T : struct, IAdditionOperators { diff --git a/src/NetFabric.Numerics.Tensors/Operators/BitwiseOperators.cs b/src/NetFabric.Numerics.Tensors/Operators/BitwiseOperators.cs index f2f828b..c18e742 100644 --- a/src/NetFabric.Numerics.Tensors/Operators/BitwiseOperators.cs +++ b/src/NetFabric.Numerics.Tensors/Operators/BitwiseOperators.cs @@ -1,6 +1,6 @@ -namespace NetFabric.Numerics.Tensors; +namespace NetFabric.Numerics.Tensors.Operators; -readonly struct BitwiseAndOperator +public readonly struct BitwiseAndOperator : IBinaryOperator where T : struct, IBitwiseOperators { @@ -13,7 +13,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Vector => x & y; } -readonly struct BitwiseAndNotOperator +public readonly struct BitwiseAndNotOperator : IBinaryOperator where T : struct, IBitwiseOperators { @@ -26,7 +26,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Vector => Vector.AndNot(x, y); } -readonly struct BitwiseOrOperator +public readonly struct BitwiseOrOperator : IBinaryOperator where T : struct, IBitwiseOperators { @@ -39,7 +39,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Vector => x | y; } -readonly struct XorOperator +public readonly struct XorOperator : IBinaryOperator where T : struct, IBitwiseOperators { @@ -53,7 +53,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Vector } -readonly struct OnesComplementOperator +public readonly struct OnesComplementOperator : IUnaryOperator where T : struct, IBitwiseOperators { diff --git a/src/NetFabric.Numerics.Tensors/Operators/ComparisonOperators.cs b/src/NetFabric.Numerics.Tensors/Operators/ComparisonOperators.cs index 79294f4..f546dc3 100644 --- a/src/NetFabric.Numerics.Tensors/Operators/ComparisonOperators.cs +++ b/src/NetFabric.Numerics.Tensors/Operators/ComparisonOperators.cs @@ -1,6 +1,6 @@ -namespace NetFabric.Numerics.Tensors; +namespace NetFabric.Numerics.Tensors.Operators; -readonly struct GreaterThanOperator +public readonly struct GreaterThanOperator : IBinaryOperator where T : struct, IComparisonOperators, IMultiplicativeIdentity { @@ -17,7 +17,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Vector => Vector.GreaterThan(x, y); } -readonly struct GreaterThanInt32Operator +public readonly struct GreaterThanInt32Operator : IBinaryOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -29,7 +29,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Vector => Vector.GreaterThan(x, y); } -readonly struct GreaterThanInt64Operator +public readonly struct GreaterThanInt64Operator : IBinaryOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -41,7 +41,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Vect => Vector.GreaterThan(x, y); } -readonly struct GreaterThanSingleOperator +public readonly struct GreaterThanSingleOperator : IBinaryOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -53,7 +53,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Vect => Vector.GreaterThan(x, y); } -readonly struct GreaterThanDoubleOperator +public readonly struct GreaterThanDoubleOperator : IBinaryOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -65,7 +65,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Ve => Vector.GreaterThan(x, y); } -readonly struct GreaterThanAllOperator +public readonly struct GreaterThanAllOperator : IBinaryToScalarOperator where T : struct, IComparisonOperators { @@ -78,7 +78,7 @@ public static bool Invoke(ref readonly Vector x, ref readonly Vector y) => Vector.GreaterThanAll(x, y); } -readonly struct GreaterThanAnyOperator +public readonly struct GreaterThanAnyOperator : IBinaryToScalarOperator where T : struct, IComparisonOperators { @@ -91,7 +91,7 @@ public static bool Invoke(ref readonly Vector x, ref readonly Vector y) => Vector.GreaterThanAny(x, y); } -readonly struct GreaterThanOrEqualOperator +public readonly struct GreaterThanOrEqualOperator : IBinaryOperator where T : struct, IComparisonOperators, IMultiplicativeIdentity { @@ -108,7 +108,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Vector => Vector.GreaterThanOrEqual(x, y); } -readonly struct GreaterThanOrEqualInt32Operator +public readonly struct GreaterThanOrEqualInt32Operator : IBinaryOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -120,7 +120,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Vector => Vector.GreaterThanOrEqual(x, y); } -readonly struct GreaterThanOrEqualInt64Operator +public readonly struct GreaterThanOrEqualInt64Operator : IBinaryOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -132,7 +132,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Vect => Vector.GreaterThanOrEqual(x, y); } -readonly struct GreaterThanOrEqualSingleOperator +public readonly struct GreaterThanOrEqualSingleOperator : IBinaryOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -144,7 +144,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Vect => Vector.GreaterThanOrEqual(x, y); } -readonly struct GreaterThanOrEqualDoubleOperator +public readonly struct GreaterThanOrEqualDoubleOperator : IBinaryOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -156,7 +156,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Ve => Vector.GreaterThanOrEqual(x, y); } -readonly struct GreaterThanOrEqualAllOperator +public readonly struct GreaterThanOrEqualAllOperator : IBinaryToScalarOperator where T : struct, IComparisonOperators { @@ -169,7 +169,7 @@ public static bool Invoke(ref readonly Vector x, ref readonly Vector y) => Vector.GreaterThanOrEqualAll(x, y); } -readonly struct GreaterThanOrEqualAnyOperator +public readonly struct GreaterThanOrEqualAnyOperator : IBinaryToScalarOperator where T : struct, IComparisonOperators { @@ -182,7 +182,7 @@ public static bool Invoke(ref readonly Vector x, ref readonly Vector y) => Vector.GreaterThanOrEqualAny(x, y); } -readonly struct LessThanOperator +public readonly struct LessThanOperator : IBinaryOperator where T : struct, IComparisonOperators, IMultiplicativeIdentity { @@ -199,7 +199,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Vector => Vector.LessThan(x, y); } -readonly struct LessThanInt32Operator +public readonly struct LessThanInt32Operator : IBinaryOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -211,7 +211,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Vector => Vector.LessThan(x, y); } -readonly struct LessThanInt64Operator +public readonly struct LessThanInt64Operator : IBinaryOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -223,7 +223,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Vect => Vector.LessThan(x, y); } -readonly struct LessThanSingleOperator +public readonly struct LessThanSingleOperator : IBinaryOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -235,7 +235,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Vect => Vector.LessThan(x, y); } -readonly struct LessThanDoubleOperator +public readonly struct LessThanDoubleOperator : IBinaryOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -247,7 +247,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Ve => Vector.LessThan(x, y); } -readonly struct LessThanOrEqualOperator +public readonly struct LessThanOrEqualOperator : IBinaryOperator where T : struct, IComparisonOperators, IMultiplicativeIdentity { @@ -264,7 +264,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Vector => Vector.LessThanOrEqual(x, y); } -readonly struct LessThanAllOperator +public readonly struct LessThanAllOperator : IBinaryToScalarOperator where T : struct, IComparisonOperators { @@ -277,7 +277,7 @@ public static bool Invoke(ref readonly Vector x, ref readonly Vector y) => Vector.LessThanAll(x, y); } -readonly struct LessThanAnyOperator +public readonly struct LessThanAnyOperator : IBinaryToScalarOperator where T : struct, IComparisonOperators { @@ -290,7 +290,7 @@ public static bool Invoke(ref readonly Vector x, ref readonly Vector y) => Vector.LessThanAny(x, y); } -readonly struct LessThanOrEqualInt32Operator +public readonly struct LessThanOrEqualInt32Operator : IBinaryOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -302,7 +302,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Vector => Vector.LessThanOrEqual(x, y); } -readonly struct LessThanOrEqualInt64Operator +public readonly struct LessThanOrEqualInt64Operator : IBinaryOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -314,7 +314,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Vect => Vector.LessThanOrEqual(x, y); } -readonly struct LessThanOrEqualSingleOperator +public readonly struct LessThanOrEqualSingleOperator : IBinaryOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -326,7 +326,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Vect => Vector.LessThanOrEqual(x, y); } -readonly struct LessThanOrEqualDoubleOperator +public readonly struct LessThanOrEqualDoubleOperator : IBinaryOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -339,7 +339,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Ve } -readonly struct LessThanOrEqualAllOperator +public readonly struct LessThanOrEqualAllOperator : IBinaryToScalarOperator where T : struct, IComparisonOperators { @@ -352,7 +352,7 @@ public static bool Invoke(ref readonly Vector x, ref readonly Vector y) => Vector.LessThanOrEqualAll(x, y); } -readonly struct LessThanOrEqualAnyOperator +public readonly struct LessThanOrEqualAnyOperator : IBinaryToScalarOperator where T : struct, IComparisonOperators { diff --git a/src/NetFabric.Numerics.Tensors/Operators/DecrementOperators.cs b/src/NetFabric.Numerics.Tensors/Operators/DecrementOperators.cs index c23f037..d87830a 100644 --- a/src/NetFabric.Numerics.Tensors/Operators/DecrementOperators.cs +++ b/src/NetFabric.Numerics.Tensors/Operators/DecrementOperators.cs @@ -1,6 +1,6 @@ -namespace NetFabric.Numerics.Tensors; +namespace NetFabric.Numerics.Tensors.Operators; -readonly struct DecrementOperator +public readonly struct DecrementOperator : IUnaryOperator where T : struct, IDecrementOperators { @@ -15,7 +15,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct CheckedDecrementOperator +public readonly struct CheckedDecrementOperator : IUnaryOperator where T : struct, IDecrementOperators { diff --git a/src/NetFabric.Numerics.Tensors/Operators/DivisionOperators.cs b/src/NetFabric.Numerics.Tensors/Operators/DivisionOperators.cs index f5265cd..cae6049 100644 --- a/src/NetFabric.Numerics.Tensors/Operators/DivisionOperators.cs +++ b/src/NetFabric.Numerics.Tensors/Operators/DivisionOperators.cs @@ -1,6 +1,6 @@ -namespace NetFabric.Numerics.Tensors; +namespace NetFabric.Numerics.Tensors.Operators; -readonly struct DivideOperator +public readonly struct DivideOperator : IBinaryOperator where T : struct, IDivisionOperators { @@ -13,7 +13,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Vector => x / y; } -readonly struct CheckedDivideOperator +public readonly struct CheckedDivideOperator : IBinaryOperator where T : struct, IDivisionOperators { diff --git a/src/NetFabric.Numerics.Tensors/Operators/EqualityOperators.cs b/src/NetFabric.Numerics.Tensors/Operators/EqualityOperators.cs index 83e7a22..e5e27d3 100644 --- a/src/NetFabric.Numerics.Tensors/Operators/EqualityOperators.cs +++ b/src/NetFabric.Numerics.Tensors/Operators/EqualityOperators.cs @@ -1,6 +1,6 @@ -namespace NetFabric.Numerics.Tensors; +namespace NetFabric.Numerics.Tensors.Operators; -readonly struct EqualsAllOperator +public readonly struct EqualsAllOperator : IBinaryToScalarOperator where T : struct, IEqualityOperators { @@ -13,7 +13,7 @@ public static bool Invoke(ref readonly Vector x, ref readonly Vector y) => Vector.EqualsAll(x, y); } -readonly struct EqualsAnyOperator +public readonly struct EqualsAnyOperator : IBinaryToScalarOperator where T : struct, IEqualityOperators { diff --git a/src/NetFabric.Numerics.Tensors/Operators/ExponentialOperators.cs b/src/NetFabric.Numerics.Tensors/Operators/ExponentialOperators.cs index edb6f6a..0d15166 100644 --- a/src/NetFabric.Numerics.Tensors/Operators/ExponentialOperators.cs +++ b/src/NetFabric.Numerics.Tensors/Operators/ExponentialOperators.cs @@ -1,6 +1,6 @@ -namespace NetFabric.Numerics.Tensors; +namespace NetFabric.Numerics.Tensors.Operators; -readonly struct ExpOperator +public readonly struct ExpOperator : IUnaryOperator where T : struct, IExponentialFunctions { @@ -17,7 +17,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct ExpM1Operator +public readonly struct ExpM1Operator : IUnaryOperator where T : struct, IExponentialFunctions { @@ -34,7 +34,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct Exp2Operator +public readonly struct Exp2Operator : IUnaryOperator where T : struct, IExponentialFunctions { @@ -51,7 +51,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct Exp2M1Operator +public readonly struct Exp2M1Operator : IUnaryOperator where T : struct, IExponentialFunctions { @@ -68,7 +68,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct Exp10Operator +public readonly struct Exp10Operator : IUnaryOperator where T : struct, IExponentialFunctions { @@ -85,7 +85,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct Exp10M1Operator +public readonly struct Exp10M1Operator : IUnaryOperator where T : struct, IExponentialFunctions { @@ -102,7 +102,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct SigmoidOperator +public readonly struct SigmoidOperator : IUnaryOperator where T : struct, IExponentialFunctions { diff --git a/src/NetFabric.Numerics.Tensors/Operators/FloatingPointIeee754Operators.cs b/src/NetFabric.Numerics.Tensors/Operators/FloatingPointIeee754Operators.cs index 0e4583d..416b223 100644 --- a/src/NetFabric.Numerics.Tensors/Operators/FloatingPointIeee754Operators.cs +++ b/src/NetFabric.Numerics.Tensors/Operators/FloatingPointIeee754Operators.cs @@ -1,6 +1,6 @@ -namespace NetFabric.Numerics.Tensors; +namespace NetFabric.Numerics.Tensors.Operators; -readonly struct Atan2Operator +public readonly struct Atan2Operator : IBinaryOperator where T : struct, IFloatingPointIeee754 { @@ -17,7 +17,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Vector => Throw.InvalidOperationException>(); } -readonly struct Atan2PiOperator +public readonly struct Atan2PiOperator : IBinaryOperator where T : struct, IFloatingPointIeee754 { @@ -34,7 +34,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Vector => Throw.InvalidOperationException>(); } -readonly struct BitDecrementOperator +public readonly struct BitDecrementOperator : IUnaryOperator where T : struct, IFloatingPointIeee754 { @@ -51,7 +51,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct BitIncrementOperator +public readonly struct BitIncrementOperator : IUnaryOperator where T : struct, IFloatingPointIeee754 { @@ -68,7 +68,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct FusedMultiplyAddOperator +public readonly struct FusedMultiplyAddOperator : ITernaryOperator where T : struct, IFloatingPointIeee754 { @@ -81,7 +81,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Vector => (x * y) + z; } -readonly struct Ieee754RemainderOperator +public readonly struct Ieee754RemainderOperator : IBinaryOperator where T : struct, IFloatingPointIeee754 { @@ -98,7 +98,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Vector => Throw.InvalidOperationException>(); } -readonly struct ILogBOperator +public readonly struct ILogBOperator : IUnaryOperator where T : struct, IFloatingPointIeee754 { @@ -115,7 +115,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct LerpOperator +public readonly struct LerpOperator : ITernaryOperator where T : struct, IFloatingPointIeee754 { @@ -132,7 +132,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Vector => Throw.InvalidOperationException>(); } -readonly struct ReciprocalEstimateOperator +public readonly struct ReciprocalEstimateOperator : IUnaryOperator where T : struct, IFloatingPointIeee754 { @@ -149,7 +149,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct ReciprocalSqrtEstimateOperator +public readonly struct ReciprocalSqrtEstimateOperator : IUnaryOperator where T : struct, IFloatingPointIeee754 { diff --git a/src/NetFabric.Numerics.Tensors/Operators/FloatingPointOperators.cs b/src/NetFabric.Numerics.Tensors/Operators/FloatingPointOperators.cs index a1e7c12..ae449f6 100644 --- a/src/NetFabric.Numerics.Tensors/Operators/FloatingPointOperators.cs +++ b/src/NetFabric.Numerics.Tensors/Operators/FloatingPointOperators.cs @@ -1,6 +1,6 @@ -namespace NetFabric.Numerics.Tensors; +namespace NetFabric.Numerics.Tensors.Operators; -readonly struct FloorOperator +public readonly struct FloorOperator : IUnaryOperator where T : struct, IFloatingPoint { @@ -17,7 +17,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct FloorSingleOperator +public readonly struct FloorSingleOperator : IUnaryOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -29,7 +29,7 @@ public static Vector Invoke(ref readonly Vector x) => Vector.Floor(x); } -readonly struct FloorDoubleOperator +public readonly struct FloorDoubleOperator : IUnaryOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -41,7 +41,7 @@ public static Vector Invoke(ref readonly Vector x) => Vector.Floor(x); } -readonly struct CeilingOperator +public readonly struct CeilingOperator : IUnaryOperator where T : struct, IFloatingPoint { @@ -58,7 +58,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct CeilingSingleOperator +public readonly struct CeilingSingleOperator : IUnaryOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -70,7 +70,7 @@ public static Vector Invoke(ref readonly Vector x) => Vector.Ceiling(x); } -readonly struct CeilingDoubleOperator +public readonly struct CeilingDoubleOperator : IUnaryOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -82,7 +82,7 @@ public static Vector Invoke(ref readonly Vector x) => Vector.Ceiling(x); } -readonly struct RoundOperator +public readonly struct RoundOperator : IUnaryOperator where T : struct, IFloatingPoint { @@ -99,7 +99,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct RoundDigitsOperator +public readonly struct RoundDigitsOperator : IBinaryScalarOperator where T : struct, IFloatingPoint { @@ -116,7 +116,7 @@ public static Vector Invoke(ref readonly Vector x, int digits) => Throw.InvalidOperationException>(); } -readonly struct RoundModeOperator +public readonly struct RoundModeOperator : IBinaryScalarOperator where T : struct, IFloatingPoint { @@ -133,7 +133,7 @@ public static Vector Invoke(ref readonly Vector x, MidpointRounding mode) => Throw.InvalidOperationException>(); } -readonly struct RoundDigitModeOperator +public readonly struct RoundDigitModeOperator : IBinaryScalarOperator where T : struct, IFloatingPoint { @@ -150,7 +150,7 @@ public static Vector Invoke(ref readonly Vector x, (int digits, MidpointRo => Throw.InvalidOperationException>(); } -readonly struct TruncateOperator +public readonly struct TruncateOperator : IUnaryOperator where T : struct, IFloatingPoint { diff --git a/src/NetFabric.Numerics.Tensors/Operators/HyperbolicOperators.cs b/src/NetFabric.Numerics.Tensors/Operators/HyperbolicOperators.cs index 692492e..29a315f 100644 --- a/src/NetFabric.Numerics.Tensors/Operators/HyperbolicOperators.cs +++ b/src/NetFabric.Numerics.Tensors/Operators/HyperbolicOperators.cs @@ -1,6 +1,6 @@ -namespace NetFabric.Numerics.Tensors; +namespace NetFabric.Numerics.Tensors.Operators; -readonly struct AcoshOperator +public readonly struct AcoshOperator : IUnaryOperator where T : struct, IHyperbolicFunctions { @@ -17,7 +17,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct AsinhOperator +public readonly struct AsinhOperator : IUnaryOperator where T : struct, IHyperbolicFunctions { @@ -34,7 +34,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct AtanhOperator +public readonly struct AtanhOperator : IUnaryOperator where T : struct, IHyperbolicFunctions { @@ -51,7 +51,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct CoshOperator +public readonly struct CoshOperator : IUnaryOperator where T : struct, IHyperbolicFunctions { @@ -68,7 +68,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct SinhOperator +public readonly struct SinhOperator : IUnaryOperator where T : struct, IHyperbolicFunctions { @@ -85,7 +85,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct TanhOperator +public readonly struct TanhOperator : IUnaryOperator where T : struct, IHyperbolicFunctions { diff --git a/src/NetFabric.Numerics.Tensors/Operators/IdentityOperator.cs b/src/NetFabric.Numerics.Tensors/Operators/IdentityOperator.cs index 261e238..674a351 100644 --- a/src/NetFabric.Numerics.Tensors/Operators/IdentityOperator.cs +++ b/src/NetFabric.Numerics.Tensors/Operators/IdentityOperator.cs @@ -1,6 +1,6 @@ -namespace NetFabric.Numerics.Tensors; +namespace NetFabric.Numerics.Tensors.Operators; -readonly struct IdentityOperator +public readonly struct IdentityOperator : IUnaryOperator where T : struct { diff --git a/src/NetFabric.Numerics.Tensors/Operators/IncrementOperators.cs b/src/NetFabric.Numerics.Tensors/Operators/IncrementOperators.cs index 5268378..f9db904 100644 --- a/src/NetFabric.Numerics.Tensors/Operators/IncrementOperators.cs +++ b/src/NetFabric.Numerics.Tensors/Operators/IncrementOperators.cs @@ -1,6 +1,6 @@ -namespace NetFabric.Numerics.Tensors; +namespace NetFabric.Numerics.Tensors.Operators; -readonly struct IncrementOperator +public readonly struct IncrementOperator : IUnaryOperator where T : struct, IIncrementOperators { @@ -15,7 +15,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct CheckedIncrementOperator +public readonly struct CheckedIncrementOperator : IUnaryOperator where T : struct, IIncrementOperators { diff --git a/src/NetFabric.Numerics.Tensors/Operators/LogarithmicOperators.cs b/src/NetFabric.Numerics.Tensors/Operators/LogarithmicOperators.cs index 744fece..32ddfb0 100644 --- a/src/NetFabric.Numerics.Tensors/Operators/LogarithmicOperators.cs +++ b/src/NetFabric.Numerics.Tensors/Operators/LogarithmicOperators.cs @@ -1,6 +1,6 @@ -namespace NetFabric.Numerics.Tensors; +namespace NetFabric.Numerics.Tensors.Operators; -readonly struct LogOperator +public readonly struct LogOperator : IUnaryOperator where T : struct, ILogarithmicFunctions { @@ -17,7 +17,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct LogBaseOperator +public readonly struct LogBaseOperator : IBinaryScalarOperator where T : struct, ILogarithmicFunctions { @@ -34,7 +34,7 @@ public static Vector Invoke(ref readonly Vector x, T newBase) => Throw.InvalidOperationException>(); } -readonly struct LogP1Operator +public readonly struct LogP1Operator : IUnaryOperator where T : struct, ILogarithmicFunctions { @@ -51,7 +51,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct Log2Operator +public readonly struct Log2Operator : IUnaryOperator where T : struct, ILogarithmicFunctions { @@ -68,7 +68,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct Log2P1Operator +public readonly struct Log2P1Operator : IUnaryOperator where T : struct, ILogarithmicFunctions { @@ -85,7 +85,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct Log10Operator +public readonly struct Log10Operator : IUnaryOperator where T : struct, ILogarithmicFunctions { @@ -102,7 +102,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct Log10P1Operator +public readonly struct Log10P1Operator : IUnaryOperator where T : struct, ILogarithmicFunctions { diff --git a/src/NetFabric.Numerics.Tensors/Operators/MaxOperator.cs b/src/NetFabric.Numerics.Tensors/Operators/MaxOperator.cs index 297e876..e5dc081 100644 --- a/src/NetFabric.Numerics.Tensors/Operators/MaxOperator.cs +++ b/src/NetFabric.Numerics.Tensors/Operators/MaxOperator.cs @@ -1,6 +1,6 @@ -namespace NetFabric.Numerics.Tensors; +namespace NetFabric.Numerics.Tensors.Operators; -readonly struct MaxAggregationOperator +public readonly struct MaxAggregationOperator : IAggregationOperator where T : struct, INumber, IMinMaxValue { @@ -16,7 +16,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Vector => Vector.Max(x, y); } -readonly struct MaxPropagateNaNOperator +public readonly struct MaxPropagateNaNOperator : IBinaryOperator where T : struct, INumber { @@ -37,7 +37,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Vector : Vector.Max(x, y); } -readonly struct MaxMagnitudeAggregationOperator +public readonly struct MaxMagnitudeAggregationOperator : IAggregationOperator where T : struct, INumberBase, IMinMaxValue { @@ -60,7 +60,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Vector } } -readonly struct MaxMagnitudePropagateNaNOperator +public readonly struct MaxMagnitudePropagateNaNOperator : IBinaryOperator where T : struct, INumberBase { diff --git a/src/NetFabric.Numerics.Tensors/Operators/MinOperator.cs b/src/NetFabric.Numerics.Tensors/Operators/MinOperator.cs index 1b3c8f8..8d55d4c 100644 --- a/src/NetFabric.Numerics.Tensors/Operators/MinOperator.cs +++ b/src/NetFabric.Numerics.Tensors/Operators/MinOperator.cs @@ -1,6 +1,6 @@ -namespace NetFabric.Numerics.Tensors; +namespace NetFabric.Numerics.Tensors.Operators; -readonly struct MinAggregationOperator +public readonly struct MinAggregationOperator : IAggregationOperator where T : struct, INumber, IMinMaxValue { @@ -16,7 +16,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Vector => Vector.Min(x, y); } -readonly struct MinPropagateNaNOperator +public readonly struct MinPropagateNaNOperator : IBinaryOperator where T : struct, INumber { @@ -37,7 +37,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Vector : Vector.Min(x, y); } -readonly struct MinMagnitudeAggregationOperator +public readonly struct MinMagnitudeAggregationOperator : IAggregationOperator where T : struct, INumberBase, IMinMaxValue { @@ -60,7 +60,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Vector } } -readonly struct MinMagnitudePropagateNaNOperator +public readonly struct MinMagnitudePropagateNaNOperator : IBinaryOperator where T : struct, INumberBase { diff --git a/src/NetFabric.Numerics.Tensors/Operators/ModulusOperators.cs b/src/NetFabric.Numerics.Tensors/Operators/ModulusOperators.cs index 1c0c233..0102cce 100644 --- a/src/NetFabric.Numerics.Tensors/Operators/ModulusOperators.cs +++ b/src/NetFabric.Numerics.Tensors/Operators/ModulusOperators.cs @@ -1,6 +1,6 @@ -namespace NetFabric.Numerics.Tensors; +namespace NetFabric.Numerics.Tensors.Operators; -readonly struct ModulusOperator +public readonly struct ModulusOperator : IBinaryOperator where T : struct, IModulusOperators { diff --git a/src/NetFabric.Numerics.Tensors/Operators/MultiplyAddOperator.cs b/src/NetFabric.Numerics.Tensors/Operators/MultiplyAddOperator.cs index b9a5227..4b57a16 100644 --- a/src/NetFabric.Numerics.Tensors/Operators/MultiplyAddOperator.cs +++ b/src/NetFabric.Numerics.Tensors/Operators/MultiplyAddOperator.cs @@ -1,6 +1,6 @@ -namespace NetFabric.Numerics.Tensors; +namespace NetFabric.Numerics.Tensors.Operators; -readonly struct MultiplyAddOperator +public readonly struct MultiplyAddOperator : ITernaryOperator where T : struct, IAdditionOperators, IMultiplyOperators { diff --git a/src/NetFabric.Numerics.Tensors/Operators/MultiplyDivideOperator.cs b/src/NetFabric.Numerics.Tensors/Operators/MultiplyDivideOperator.cs index 2a5f16f..73009cb 100644 --- a/src/NetFabric.Numerics.Tensors/Operators/MultiplyDivideOperator.cs +++ b/src/NetFabric.Numerics.Tensors/Operators/MultiplyDivideOperator.cs @@ -1,6 +1,6 @@ -namespace NetFabric.Numerics.Tensors; +namespace NetFabric.Numerics.Tensors.Operators; -readonly struct MultiplyDivideOperator +public readonly struct MultiplyDivideOperator : ITernaryOperator where T : struct, IMultiplyOperators, IDivisionOperators { diff --git a/src/NetFabric.Numerics.Tensors/Operators/MultiplyOperators.cs b/src/NetFabric.Numerics.Tensors/Operators/MultiplyOperators.cs index b144b03..68be658 100644 --- a/src/NetFabric.Numerics.Tensors/Operators/MultiplyOperators.cs +++ b/src/NetFabric.Numerics.Tensors/Operators/MultiplyOperators.cs @@ -1,6 +1,6 @@ -namespace NetFabric.Numerics.Tensors; +namespace NetFabric.Numerics.Tensors.Operators; -readonly struct MultiplyOperator +public readonly struct MultiplyOperator : IBinaryOperator where T : struct, IMultiplyOperators { @@ -13,7 +13,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Vector => x * y; } -readonly struct CheckedMultiplyOperator +public readonly struct CheckedMultiplyOperator : IBinaryOperator where T : struct, IMultiplyOperators { @@ -30,7 +30,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Vector => Throw.InvalidOperationException>(); } -readonly struct MultiplyScalarOperator +public readonly struct MultiplyScalarOperator : IBinaryScalarOperator where T : struct, IMultiplyOperators { diff --git a/src/NetFabric.Numerics.Tensors/Operators/PowerFunctionsOperators.cs b/src/NetFabric.Numerics.Tensors/Operators/PowerFunctionsOperators.cs index b00376b..1c80219 100644 --- a/src/NetFabric.Numerics.Tensors/Operators/PowerFunctionsOperators.cs +++ b/src/NetFabric.Numerics.Tensors/Operators/PowerFunctionsOperators.cs @@ -1,6 +1,6 @@ -namespace NetFabric.Numerics.Tensors; +namespace NetFabric.Numerics.Tensors.Operators; -readonly struct SquareOperator +public readonly struct SquareOperator : IUnaryOperator where T : struct, IMultiplyOperators { @@ -13,7 +13,7 @@ public static Vector Invoke(ref readonly Vector x) => x * x; } -readonly struct CubeOperator +public readonly struct CubeOperator : IUnaryOperator where T : struct, IMultiplyOperators { @@ -26,7 +26,7 @@ public static Vector Invoke(ref readonly Vector x) => x * x * x; } -readonly struct PowOperator +public readonly struct PowOperator : IBinaryScalarOperator where T : struct, IPowerFunctions { diff --git a/src/NetFabric.Numerics.Tensors/Operators/ProductOperator.cs b/src/NetFabric.Numerics.Tensors/Operators/ProductOperator.cs index 5d35dfb..fb0829d 100644 --- a/src/NetFabric.Numerics.Tensors/Operators/ProductOperator.cs +++ b/src/NetFabric.Numerics.Tensors/Operators/ProductOperator.cs @@ -1,6 +1,6 @@ -namespace NetFabric.Numerics.Tensors; +namespace NetFabric.Numerics.Tensors.Operators; -readonly struct ProductOperator +public readonly struct ProductOperator : IAggregationOperator where T : struct, IMultiplicativeIdentity, IMultiplyOperators { diff --git a/src/NetFabric.Numerics.Tensors/Operators/RootFunctionsOperators.cs b/src/NetFabric.Numerics.Tensors/Operators/RootFunctionsOperators.cs index 8923825..d41922e 100644 --- a/src/NetFabric.Numerics.Tensors/Operators/RootFunctionsOperators.cs +++ b/src/NetFabric.Numerics.Tensors/Operators/RootFunctionsOperators.cs @@ -1,6 +1,6 @@ -namespace NetFabric.Numerics.Tensors; +namespace NetFabric.Numerics.Tensors.Operators; -readonly struct CbrtOperator +public readonly struct CbrtOperator : IUnaryOperator where T : struct, IRootFunctions { @@ -17,7 +17,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct HypotOperator +public readonly struct HypotOperator : IBinaryOperator where T : struct, IRootFunctions { @@ -34,7 +34,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Vector => Throw.InvalidOperationException>(); } -readonly struct RootNOperator +public readonly struct RootNOperator : IBinaryScalarOperator where T : struct, IRootFunctions { @@ -51,7 +51,7 @@ public static Vector Invoke(ref readonly Vector x, int y) => Throw.InvalidOperationException>(); } -readonly struct SqrtOperator +public readonly struct SqrtOperator : IUnaryOperator where T : struct, IRootFunctions { diff --git a/src/NetFabric.Numerics.Tensors/Operators/ShiftLeftOperator.cs b/src/NetFabric.Numerics.Tensors/Operators/ShiftLeftOperator.cs index e1f86ed..8fdcb9f 100644 --- a/src/NetFabric.Numerics.Tensors/Operators/ShiftLeftOperator.cs +++ b/src/NetFabric.Numerics.Tensors/Operators/ShiftLeftOperator.cs @@ -1,6 +1,6 @@ -namespace NetFabric.Numerics.Tensors; +namespace NetFabric.Numerics.Tensors.Operators; -readonly struct ShiftLeftOperator +public readonly struct ShiftLeftOperator : IBinaryScalarOperator where T : struct, IShiftOperators where TResult : struct @@ -16,7 +16,7 @@ public static Vector Invoke(ref readonly Vector value, int count) => Throw.NotSupportedException>(); } -readonly struct ShiftLeftSByteOperator +public readonly struct ShiftLeftSByteOperator : IBinaryScalarOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -28,7 +28,7 @@ public static Vector Invoke(ref readonly Vector value, int count) => Vector.ShiftLeft(value, count); } -readonly struct ShiftLeftUInt16Operator +public readonly struct ShiftLeftUInt16Operator : IBinaryScalarOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -40,7 +40,7 @@ public static Vector Invoke(ref readonly Vector value, int count => Vector.ShiftLeft(value, count); } -readonly struct ShiftLeftUInt32Operator +public readonly struct ShiftLeftUInt32Operator : IBinaryScalarOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -52,7 +52,7 @@ public static Vector Invoke(ref readonly Vector value, int count) => Vector.ShiftLeft(value, count); } -readonly struct ShiftLeftUInt64Operator +public readonly struct ShiftLeftUInt64Operator : IBinaryScalarOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -64,7 +64,7 @@ public static Vector Invoke(ref readonly Vector value, int count) => Vector.ShiftLeft(value, count); } -readonly struct ShiftLeftUIntPtrOperator +public readonly struct ShiftLeftUIntPtrOperator : IBinaryScalarOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -76,7 +76,7 @@ public static Vector Invoke(ref readonly Vector value, int cou => Vector.ShiftLeft(value, count); } -readonly struct ShiftLeftByteOperator +public readonly struct ShiftLeftByteOperator : IBinaryScalarOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -88,7 +88,7 @@ public static Vector Invoke(ref readonly Vector value, int count) => Vector.ShiftLeft(value, count); } -readonly struct ShiftLeftInt16Operator +public readonly struct ShiftLeftInt16Operator : IBinaryScalarOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -100,7 +100,7 @@ public static Vector Invoke(ref readonly Vector value, int count) => Vector.ShiftLeft(value, count); } -readonly struct ShiftLeftInt32Operator +public readonly struct ShiftLeftInt32Operator : IBinaryScalarOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -112,7 +112,7 @@ public static Vector Invoke(ref readonly Vector value, int count) => Vector.ShiftLeft(value, count); } -readonly struct ShiftLeftInt64Operator +public readonly struct ShiftLeftInt64Operator : IBinaryScalarOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -124,7 +124,7 @@ public static Vector Invoke(ref readonly Vector value, int count) => Vector.ShiftLeft(value, count); } -readonly struct ShiftLeftIntPtrOperator +public readonly struct ShiftLeftIntPtrOperator : IBinaryScalarOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] diff --git a/src/NetFabric.Numerics.Tensors/Operators/ShiftRightAritmeticOperator.cs b/src/NetFabric.Numerics.Tensors/Operators/ShiftRightAritmeticOperator.cs index 0fa2642..f4fec8e 100644 --- a/src/NetFabric.Numerics.Tensors/Operators/ShiftRightAritmeticOperator.cs +++ b/src/NetFabric.Numerics.Tensors/Operators/ShiftRightAritmeticOperator.cs @@ -1,6 +1,6 @@ -namespace NetFabric.Numerics.Tensors; +namespace NetFabric.Numerics.Tensors.Operators; -readonly struct ShiftRightArithmeticOperator +public readonly struct ShiftRightArithmeticOperator : IBinaryScalarOperator where T : struct, IShiftOperators where TResult : struct @@ -16,7 +16,7 @@ public static Vector Invoke(ref readonly Vector value, int count) => Throw.NotSupportedException>(); } -readonly struct ShiftRightArithmeticSByteOperator +public readonly struct ShiftRightArithmeticSByteOperator : IBinaryScalarOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -28,7 +28,7 @@ public static Vector Invoke(ref readonly Vector value, int count) => Vector.ShiftRightArithmetic(value, count); } -readonly struct ShiftRightArithmeticInt16Operator +public readonly struct ShiftRightArithmeticInt16Operator : IBinaryScalarOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -40,7 +40,7 @@ public static Vector Invoke(ref readonly Vector value, int count) => Vector.ShiftRightArithmetic(value, count); } -readonly struct ShiftRightArithmeticInt32Operator +public readonly struct ShiftRightArithmeticInt32Operator : IBinaryScalarOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -52,7 +52,7 @@ public static Vector Invoke(ref readonly Vector value, int count) => Vector.ShiftRightArithmetic(value, count); } -readonly struct ShiftRightArithmeticInt64Operator +public readonly struct ShiftRightArithmeticInt64Operator : IBinaryScalarOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -64,7 +64,7 @@ public static Vector Invoke(ref readonly Vector value, int count) => Vector.ShiftRightArithmetic(value, count); } -readonly struct ShiftRightArithmeticIntPtrOperator +public readonly struct ShiftRightArithmeticIntPtrOperator : IBinaryScalarOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] diff --git a/src/NetFabric.Numerics.Tensors/Operators/ShiftRightLogicalOperator.cs b/src/NetFabric.Numerics.Tensors/Operators/ShiftRightLogicalOperator.cs index c4489b8..8e219e9 100644 --- a/src/NetFabric.Numerics.Tensors/Operators/ShiftRightLogicalOperator.cs +++ b/src/NetFabric.Numerics.Tensors/Operators/ShiftRightLogicalOperator.cs @@ -1,6 +1,6 @@ -namespace NetFabric.Numerics.Tensors; +namespace NetFabric.Numerics.Tensors.Operators; -readonly struct ShiftRightLogicalOperator +public readonly struct ShiftRightLogicalOperator : IBinaryScalarOperator where T : struct, IShiftOperators where TResult : struct @@ -16,7 +16,7 @@ public static Vector Invoke(ref readonly Vector value, int count) => Throw.NotSupportedException>(); } -readonly struct ShiftRightLogicalByteOperator +public readonly struct ShiftRightLogicalByteOperator : IBinaryScalarOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -28,7 +28,7 @@ public static Vector Invoke(ref readonly Vector value, int count) => Vector.ShiftRightLogical(value, count); } -readonly struct ShiftRightLogicalUInt16Operator +public readonly struct ShiftRightLogicalUInt16Operator : IBinaryScalarOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -40,7 +40,7 @@ public static Vector Invoke(ref readonly Vector value, int count => Vector.ShiftRightLogical(value, count); } -readonly struct ShiftRightLogicalUInt32Operator +public readonly struct ShiftRightLogicalUInt32Operator : IBinaryScalarOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -52,7 +52,7 @@ public static Vector Invoke(ref readonly Vector value, int count) => Vector.ShiftRightLogical(value, count); } -readonly struct ShiftRightLogicalUInt64Operator +public readonly struct ShiftRightLogicalUInt64Operator : IBinaryScalarOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -64,7 +64,7 @@ public static Vector Invoke(ref readonly Vector value, int count) => Vector.ShiftRightLogical(value, count); } -readonly struct ShiftRightLogicalUIntPtrOperator +public readonly struct ShiftRightLogicalUIntPtrOperator : IBinaryScalarOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -76,7 +76,7 @@ public static Vector Invoke(ref readonly Vector value, int cou => Vector.ShiftRightLogical(value, count); } -readonly struct ShiftRightLogicalSByteOperator +public readonly struct ShiftRightLogicalSByteOperator : IBinaryScalarOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -88,7 +88,7 @@ public static Vector Invoke(ref readonly Vector value, int count) => Vector.ShiftRightLogical(value, count); } -readonly struct ShiftRightLogicalInt16Operator +public readonly struct ShiftRightLogicalInt16Operator : IBinaryScalarOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -100,7 +100,7 @@ public static Vector Invoke(ref readonly Vector value, int count) => Vector.ShiftRightLogical(value, count); } -readonly struct ShiftRightLogicalInt32Operator +public readonly struct ShiftRightLogicalInt32Operator : IBinaryScalarOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -112,7 +112,7 @@ public static Vector Invoke(ref readonly Vector value, int count) => Vector.ShiftRightLogical(value, count); } -readonly struct ShiftRightLogicalInt64Operator +public readonly struct ShiftRightLogicalInt64Operator : IBinaryScalarOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -124,7 +124,7 @@ public static Vector Invoke(ref readonly Vector value, int count) => Vector.ShiftRightLogical(value, count); } -readonly struct ShiftRightLogicalIntPtrOperator +public readonly struct ShiftRightLogicalIntPtrOperator : IBinaryScalarOperator { [MethodImpl(MethodImplOptions.AggressiveInlining)] diff --git a/src/NetFabric.Numerics.Tensors/Operators/SubtractionOperators.cs b/src/NetFabric.Numerics.Tensors/Operators/SubtractionOperators.cs index 72cab2d..fbad986 100644 --- a/src/NetFabric.Numerics.Tensors/Operators/SubtractionOperators.cs +++ b/src/NetFabric.Numerics.Tensors/Operators/SubtractionOperators.cs @@ -1,6 +1,6 @@ -namespace NetFabric.Numerics.Tensors; +namespace NetFabric.Numerics.Tensors.Operators; -readonly struct SubtractOperator +public readonly struct SubtractOperator : IBinaryOperator where T : struct, ISubtractionOperators { @@ -13,7 +13,7 @@ public static Vector Invoke(ref readonly Vector x, ref readonly Vector => x - y; } -readonly struct CheckedSubtractOperator +public readonly struct CheckedSubtractOperator : IBinaryOperator where T : struct, ISubtractionOperators { diff --git a/src/NetFabric.Numerics.Tensors/Operators/SumOperator.cs b/src/NetFabric.Numerics.Tensors/Operators/SumOperator.cs index 4c8ca03..24f8ccc 100644 --- a/src/NetFabric.Numerics.Tensors/Operators/SumOperator.cs +++ b/src/NetFabric.Numerics.Tensors/Operators/SumOperator.cs @@ -1,6 +1,6 @@ -namespace NetFabric.Numerics.Tensors; +namespace NetFabric.Numerics.Tensors.Operators; -readonly struct SumOperator +public readonly struct SumOperator : IAggregationOperator where T : struct, IAdditiveIdentity, IAdditionOperators { diff --git a/src/NetFabric.Numerics.Tensors/Operators/TrigonometricOperators.cs b/src/NetFabric.Numerics.Tensors/Operators/TrigonometricOperators.cs index d96427d..131e29a 100644 --- a/src/NetFabric.Numerics.Tensors/Operators/TrigonometricOperators.cs +++ b/src/NetFabric.Numerics.Tensors/Operators/TrigonometricOperators.cs @@ -1,6 +1,6 @@ -namespace NetFabric.Numerics.Tensors; +namespace NetFabric.Numerics.Tensors.Operators; -readonly struct AcosOperator +public readonly struct AcosOperator : IUnaryOperator where T : struct, ITrigonometricFunctions { @@ -17,7 +17,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct AcosPiOperator +public readonly struct AcosPiOperator : IUnaryOperator where T : struct, ITrigonometricFunctions { @@ -34,7 +34,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct AsinOperator +public readonly struct AsinOperator : IUnaryOperator where T : struct, ITrigonometricFunctions { @@ -51,7 +51,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct AsinPiOperator +public readonly struct AsinPiOperator : IUnaryOperator where T : struct, ITrigonometricFunctions { @@ -68,7 +68,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct AtanOperator +public readonly struct AtanOperator : IUnaryOperator where T : struct, ITrigonometricFunctions { @@ -85,7 +85,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct AtanPiOperator +public readonly struct AtanPiOperator : IUnaryOperator where T : struct, ITrigonometricFunctions { @@ -102,7 +102,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct CosOperator +public readonly struct CosOperator : IUnaryOperator where T : struct, ITrigonometricFunctions { @@ -119,7 +119,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct CosPiOperator +public readonly struct CosPiOperator : IUnaryOperator where T : struct, ITrigonometricFunctions { @@ -136,7 +136,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct SinOperator +public readonly struct SinOperator : IUnaryOperator where T : struct, ITrigonometricFunctions { @@ -153,7 +153,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct SinPiOperator +public readonly struct SinPiOperator : IUnaryOperator where T : struct, ITrigonometricFunctions { @@ -170,7 +170,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct TanOperator +public readonly struct TanOperator : IUnaryOperator where T : struct, ITrigonometricFunctions { @@ -187,7 +187,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct TanPiOperator +public readonly struct TanPiOperator : IUnaryOperator where T : struct, ITrigonometricFunctions { @@ -204,7 +204,7 @@ public static Vector Invoke(ref readonly Vector x) => Throw.InvalidOperationException>(); } -readonly struct SinCosOperator +public readonly struct SinCosOperator : IUnaryOperator where T : struct, ITrigonometricFunctions { @@ -221,7 +221,7 @@ public static (T Sin, T Cos) Invoke(T x) => Throw.InvalidOperationException>(); } -readonly struct SinCosPiOperator +public readonly struct SinCosPiOperator : IUnaryOperator where T : struct, ITrigonometricFunctions { diff --git a/src/NetFabric.Numerics.Tensors/Operators/UnaryNegationOperator.cs b/src/NetFabric.Numerics.Tensors/Operators/UnaryNegationOperator.cs index 8f78435..ff41a08 100644 --- a/src/NetFabric.Numerics.Tensors/Operators/UnaryNegationOperator.cs +++ b/src/NetFabric.Numerics.Tensors/Operators/UnaryNegationOperator.cs @@ -1,6 +1,6 @@ -namespace NetFabric.Numerics.Tensors; +namespace NetFabric.Numerics.Tensors.Operators; -readonly struct NegateOperator +public readonly struct NegateOperator : IUnaryOperator where T : struct, IUnaryNegationOperators { @@ -13,7 +13,7 @@ public static Vector Invoke(ref readonly Vector value) => -value; } -readonly struct CheckedNegateOperator +public readonly struct CheckedNegateOperator : IUnaryOperator where T : struct, IUnaryNegationOperators {