Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeppySolver ¶
type DeppySolver struct {
// contains filtered or unexported fields
}
DeppySolver is a simple solver implementation that takes an entity source group and a constraint aggregator to produce a Solution (or error if no solution can be found)
func NewDeppySolver ¶
func NewDeppySolver(variableSource input.VariableSource) *DeppySolver
type Option ¶
type Option func(solutionOptions *solutionOptions)
func AddAllVariablesToSolution ¶
func AddAllVariablesToSolution() Option
AddAllVariablesToSolution is a Solve option that instructs the solver to include all the variables considered to the Solution it produces
type Solution ¶
type Solution struct {
// contains filtered or unexported fields
}
Solution is returned by the Solver when the internal solver executed successfully. A successful execution of the solver can still end in an error when no solution can be found.
func (*Solution) AllVariables ¶
AllVariables returns all the variables that were considered by the solver to obtain (or not) a solution. Note: This is only be present if the AddAllVariablesToSolution option is passed in to the Solve call that generated the solution.
func (*Solution) Error ¶
Error returns the resolution error in case the problem is unsat on successful resolution, it will return nil
func (*Solution) IsSelected ¶
func (s *Solution) IsSelected(identifier deppy.Identifier) bool
IsSelected returns true if the variable identified by the identifier was selected in the solution by the resolver. It will return false otherwise.
func (*Solution) SelectedVariables ¶
func (s *Solution) SelectedVariables() map[deppy.Identifier]deppy.Variable
SelectedVariables returns the variables that were selected by the solver as part of the solution