-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinit_test.go
42 lines (37 loc) · 1.05 KB
/
init_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package gridsearch
import (
"fmt"
"testing"
)
func TestInit(t *testing.T) {
fmt.Println("=======================")
fmt.Println("Test results from TestInit")
fmt.Println("-----------------------")
fmt.Println("//Go code:")
fmt.Println("g := InitGrid([]float64{1, 2, 3}, []float64{1, 3, 2})")
fmt.Println("fmt.Println(g)")
fmt.Println("-----------------------")
fmt.Println("//results:")
g := InitGrid([]float64{1, 2, 3}, []float64{1, 3, 2})
fmt.Println(g)
fmt.Println("-----------------------")
fmt.Println("Go code:")
fmt.Println("g.Append(FromToBy(1, 0, -.2))")
fmt.Println("g.Append(FromToLen(1, 0, 5))")
fmt.Println("g.SetNumGoRoutines(2)")
fmt.Println("g.SetZoom(1)")
fmt.Println("g.SetDecay(.8)")
fmt.Println("g.SetNumReturn(3)")
fmt.Println("fmt.Println(g)")
fmt.Println("g.Append(FromToLen(1, 0, 5))")
fmt.Println("-----------------------")
fmt.Println("results:")
g.Append(FromToBy(1, 0, -.2))
g.Append(FromToLen(1, 0, 5))
g.SetNumGoRoutines(2)
g.SetZoom(1)
g.SetDecay(.8)
g.SetNumReturn(3)
fmt.Println(g)
fmt.Println(g.Dim())
}