solver

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2023 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Overview

Package solver implements a general-purpose solver for boolean constraint satisfiability problems.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultTracer added in v0.3.0

type DefaultTracer struct{}

func (DefaultTracer) Trace added in v0.3.0

type DuplicateIdentifier added in v0.3.0

type DuplicateIdentifier deppy.Identifier

func (DuplicateIdentifier) Error added in v0.3.0

func (e DuplicateIdentifier) Error() string

type LoggingTracer added in v0.3.0

type LoggingTracer struct {
	Writer io.Writer
}

func (LoggingTracer) Trace added in v0.3.0

func (t LoggingTracer) Trace(p deppy.SearchPosition)

type Option

type Option func(s *Solver) error

func WithTracer added in v0.3.0

func WithTracer(t deppy.Tracer) Option

type Solver added in v0.3.0

type Solver struct {
	// contains filtered or unexported fields
}

func New added in v0.3.0

func New(options ...Option) (*Solver, error)

func (*Solver) Solve added in v0.3.0

func (s *Solver) Solve(input []deppy.Variable) ([]deppy.Variable, error)

Solve takes a slice containing all Variables and returns a slice containing only those Variables that were selected for installation. If no solution is possible an error is returned.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL