Make solver type switchable

This commit is contained in:
Ettore Di Giacinto
2020-10-25 18:43:35 +01:00
committed by Ettore Di Giacinto
parent 9f1a182eee
commit 95e640c9d0
17 changed files with 137 additions and 74 deletions

View File

@@ -64,10 +64,11 @@ type LuetGeneralConfig struct {
}
type LuetSolverOptions struct {
Type string `mapstructure:"type"`
LearnRate float32 `mapstructure:"rate"`
Discount float32 `mapstructure:"discount"`
MaxAttempts int `mapstructure:"max_attempts"`
Type string `mapstructure:"type"`
LearnRate float32 `mapstructure:"rate"`
Discount float32 `mapstructure:"discount"`
MaxAttempts int `mapstructure:"max_attempts"`
Implementation solver.SolverType `mapstructure:"implementation"`
}
func (opts LuetSolverOptions) Resolver() solver.PackageResolver {