Esempio n. 1
0
// Find the minimum of EpsilonBar.
func (env *Environment) setEpsilonMinCache() {
	worker := func(k vec.Vector) float64 {
		return env.epsilonBar(k)
	}
	env.epsilonMinCache = bzone.Min(env.PointsPerSide, 2, worker)
	//println(env.epsilonMinCache)
}
Esempio n. 2
0
// The minimum of env.Xi() should be equal to -env.Mu_h.
func TestXiMin(t *testing.T) {
	env, err := envDefaultEnv()
	if err != nil {
		t.Fatal(err)
	}
	worker := func(k vec.Vector) float64 {
		return env.Xi_h(k)
	}
	min := bzone.Min(env.PointsPerSide, 2, worker)
	if min != -env.Mu_h {
		t.Fatalf("env.Xi() minimum (%v) is != -Mu_h (%v)", min, env.Mu_h)
	}
}
Esempio n. 3
0
// The minimum of env.Epsilon() should be equal to 0.
func TestEpsilonMin(t *testing.T) {
	env, err := envDefaultEnv()
	if err != nil {
		t.Fatal(err)
	}
	worker := func(k vec.Vector) float64 {
		return env.Epsilon_h(k)
	}
	min := bzone.Min(env.PointsPerSide, 2, worker)
	if min != 0.0 {
		t.Fatalf("env.Epsilon() minimum (%v) is nonzero", min)
	}
}