예제 #1
0
func TestLowBound(t *testing.T) {
	x := real.Vector{1, 3}
	x.LowBound(2)
	if x[0] != 2 || x[1] != 3 {
		t.Fail()
	}
}
예제 #2
0
func TestBound(t *testing.T) {
	x := real.Vector{1, 4}
	x.Bound(real.Vector{2, 2}, real.Vector{3, 3})
	if x[0] != 2 || x[1] != 3 {
		t.Fail()
	}
}
예제 #3
0
func TestHighBound(t *testing.T) {
	x := real.Vector{1, 3}
	x.HighBound(2)
	if x[0] != 1 || x[1] != 2 {
		t.Fail()
	}
}