Exemplo n.º 1
0
func newGradOptimizer() *gradOptimizer {
	m := &gradOptimizer{
		loc:  uni.NewLocation(),
		obj:  uni.NewObjective(),
		grad: uni.NewGradient(),
	}
	return m
}
Exemplo n.º 2
0
func newUniGradStruct() *uniGradStruct {
	m := &uniGradStruct{
		OptCommon: common.NewOptCommon(),
		loc:       uni.NewLocation(),
		obj:       uni.NewObjective(),
		grad:      uni.NewGradient(),
		result:    &UniGradResult{},
	}
	// TODO: Something about settings
	return m
}