Class ArrayRoutines
- Namespace
- NeuralNetworks.Core
- Assembly
- NeuralNetworks.dll
Provides extension methods for comparing the shape of single- and multi-dimensional float arrays.
public static class ArrayRoutines
- Inheritance
-
ArrayRoutines
- Inherited Members
Remarks
Includes overloads that verify dimension lengths match for array ranks one through four. Useful for validating array compatibility before element-wise operations.
Methods
HasSameShape(float[,,,], float[,,,])
Checks whether two four-dimensional arrays have the same shape across all dimensions.
public static bool HasSameShape(this float[,,,] source, float[,,,] matrix)
Parameters
Returns
- bool
True if all corresponding dimensions are equal; otherwise false.
HasSameShape(float[,,], float[,,])
public static bool HasSameShape(this float[,,] source, float[,,] matrix)
Parameters
Returns
HasSameShape(float[,], float[,])
Checks whether two two-dimensional arrays have the same shape (dim1 and dim2).
public static bool HasSameShape(this float[,] source, float[,] matrix)
Parameters
Returns
- bool
True if both arrays have equal rows and columns; otherwise false.
HasSameShape(float[], float[])
Checks whether two one-dimensional arrays have the same shape (length).
public static bool HasSameShape(this float[] source, float[] matrix)
Parameters
Returns
- bool
True if both arrays have equal length; otherwise false.