Benchmark a 10 by 10 matrix for computational throughput.
(b *testing.B)
| 128 | |
| 129 | // Benchmark a 10 by 10 matrix for computational throughput. |
| 130 | func BenchmarkMatrixDeterminant(b *testing.B) { |
| 131 | // Create a 10 by 10 matrix for benchmarking |
| 132 | rows := 10 |
| 133 | columns := 10 |
| 134 | initialValue := 0 |
| 135 | matrix := matrix.New(rows, columns, initialValue) |
| 136 | |
| 137 | b.ResetTimer() |
| 138 | |
| 139 | for i := 0; i < b.N; i++ { |
| 140 | _, _ = matrix.Determinant() |
| 141 | } |
| 142 | } |
nothing calls this directly
no test coverage detected