MCPcopy Create free account
hub / github.com/TheAlgorithms/Go / BenchmarkMatrixDeterminant

Function BenchmarkMatrixDeterminant

math/matrix/determinant_test.go:130–142  ·  view source on GitHub ↗

Benchmark a 10 by 10 matrix for computational throughput.

(b *testing.B)

Source from the content-addressed store, hash-verified

128
129// Benchmark a 10 by 10 matrix for computational throughput.
130func 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}

Callers

nothing calls this directly

Calls 2

NewFunction · 0.92
DeterminantMethod · 0.80

Tested by

no test coverage detected