(rows, columns int)
| 103 | } |
| 104 | |
| 105 | func MakeRandomMatrix[T constraints.Integer](rows, columns int) matrix.Matrix[T] { |
| 106 | rand.New(rand.NewSource(time.Now().UnixNano())) |
| 107 | |
| 108 | matrixData := make([][]T, rows) |
| 109 | for i := 0; i < rows; i++ { |
| 110 | matrixData[i] = make([]T, columns) |
| 111 | for j := 0; j < columns; j++ { |
| 112 | matrixData[i][j] = T(rand.Intn(1000)) // Generate random integers between 0 and 1000 |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | randomMatrix, _ := matrix.NewFromElements(matrixData) |
| 117 | return randomMatrix |
| 118 | } |
| 119 | |
| 120 | // BenchmarkStrassenMatrixMultiply benchmarks the StrassenMatrixMultiply function. |
| 121 | func BenchmarkStrassenMatrixMultiply(b *testing.B) { |
nothing calls this directly
no test coverage detected