mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
small refactoring including doc
Former-commit-id: 6d6b527d89d77aa571831f7500f841840e280536
This commit is contained in:
@ -33,6 +33,15 @@ func Make2DArray[T any](rows, cols int) Matrix[T] {
|
||||
return matrix
|
||||
}
|
||||
|
||||
// Make2DNumericArray generates a 2D numeric array with the specified number of rows and columns.
|
||||
//
|
||||
// Parameters:
|
||||
// - rows: the number of rows in the array.
|
||||
// - cols: the number of columns in the array.
|
||||
// - zeroed: a boolean indicating whether the array should be initialized with zeros.
|
||||
//
|
||||
// Returns:
|
||||
// - matrix: a 2D numeric array with the specified dimensions.
|
||||
func Make2DNumericArray[T Numeric](rows, cols int, zeroed bool) Matrix[T] {
|
||||
matrix := make(Matrix[T], rows)
|
||||
data := make([]T, cols*rows)
|
||||
|
Reference in New Issue
Block a user