MCPcopy Create free account
hub / github.com/algorithm-archivists/algorithm-archive / main

Function main

contents/thomas_algorithm/code/go/thomas.go:22–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20}
21
22func main() {
23 a := []float64{0., 2., 3.}
24 b := []float64{1., 3., 6.}
25 c := []float64{4., 5., 0.}
26 d := []float64{7., 5., 3.}
27
28 fmt.Println("The system,")
29 fmt.Println("[1.0 4.0 0.0][x] = [7.0]")
30 fmt.Println("[2.0 3.0 5.0][y] = [5.0]")
31 fmt.Println("[0.0 3.0 6.0][z] = [3.0]")
32 fmt.Println("has the solution:")
33 solve := thomas(a, b, c, d)
34 for _, i := range solve {
35 fmt.Printf("[%f]\n", i)
36 }
37}

Callers

nothing calls this directly

Calls 1

thomasFunction · 0.70

Tested by

no test coverage detected