Working on Factorize
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// file="Matrix"
|
||||
// Project: StgSharp
|
||||
@@ -52,7 +52,8 @@ namespace StgSharp.Mathematics.Numeric
|
||||
|
||||
public static MatrixAllocation DefaultAllocation { get; set; } = MatrixAllocation.GC;
|
||||
|
||||
public static Matrix<T> FromDefault<T>(int columnLength, int rowLength) where T : unmanaged, INumber<T>
|
||||
public static Matrix<T> FromDefault<T>(int columnLength, int rowLength)
|
||||
where T : unmanaged, INumber<T>
|
||||
{
|
||||
return DefaultAllocation switch
|
||||
{
|
||||
@@ -62,15 +63,20 @@ namespace StgSharp.Mathematics.Numeric
|
||||
};
|
||||
}
|
||||
|
||||
public static Matrix<T> FromGC<T>(int columnLength, int rowLength) where T : unmanaged, INumber<T>
|
||||
public static Matrix<T> FromGC<T>(int columnLength, int rowLength)
|
||||
where T : unmanaged, INumber<T>
|
||||
{
|
||||
return new GCMatrix<T>(columnLength, rowLength);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static Matrix<T> FromHlsf<T>(int columnLength, int rowLength, hlsfAllocator allocator)
|
||||
public static Matrix<T> FromHlsf<T>(
|
||||
int columnLength,
|
||||
int rowLength,
|
||||
hlsfAllocator allocator)
|
||||
where T : unmanaged, INumber<T>
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(allocator, nameof(allocator));
|
||||
return new HlsfMatrix<T>(columnLength, rowLength, allocator);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user