expr

package
v0.0.0-...-ae8e47d Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LinearExpression

type LinearExpression []Term

func NewLinearExpression

func NewLinearExpression(vID int, cID constraint.Coeff) LinearExpression

NewLinearExpression helper to initialize a linear expression with one term

func (LinearExpression) Clone

func (LinearExpression) Equal

Equals returns true if both SORTED expressions are the same

pre conditions: l and o are sorted

func (LinearExpression) HashCode

func (l LinearExpression) HashCode() uint64

HashCode returns a fast-to-compute but NOT collision resistant hash code identifier for the linear expression

func (LinearExpression) Len

func (l LinearExpression) Len() int

Len return the lenght of the Variable (implements Sort interface)

func (LinearExpression) Less

func (l LinearExpression) Less(i, j int) bool

Less returns true if variableID for term at i is less than variableID for term at j (implements Sort interface)

func (LinearExpression) Swap

func (l LinearExpression) Swap(i, j int)

Swap swaps terms in the Variable (implements Sort interface)

type LinearExpressionToRefactor

type LinearExpressionToRefactor []TermToRefactor

func (LinearExpressionToRefactor) Clone

func (LinearExpressionToRefactor) Equal

Equals returns true if both SORTED expressions are the same

pre conditions: l and o are sorted

func (LinearExpressionToRefactor) HashCode

func (l LinearExpressionToRefactor) HashCode() uint64

HashCode returns a fast-to-compute but NOT collision resistant hash code identifier for the linear expression

func (LinearExpressionToRefactor) Len

Len return the lenght of the Variable (implements Sort interface)

func (LinearExpressionToRefactor) Less

func (l LinearExpressionToRefactor) Less(i, j int) bool

Less returns true if variableID for term at i is less than variableID for term at j (implements Sort interface)

func (LinearExpressionToRefactor) Swap

func (l LinearExpressionToRefactor) Swap(i, j int)

Swap swaps terms in the Variable (implements Sort interface)

type Term

type Term struct {
	VID   int
	Coeff constraint.Coeff
}

func NewTerm

func NewTerm(vID int, cID constraint.Coeff) Term

func (Term) HashCode

func (t Term) HashCode() uint64

func (*Term) SetCoeff

func (t *Term) SetCoeff(c constraint.Coeff)

func (Term) WireID

func (t Term) WireID() int

type TermToRefactor

type TermToRefactor struct {
	CID int
	VID int
}

func NewTermToRefactor

func NewTermToRefactor(vID, cID int) TermToRefactor

func (TermToRefactor) HashCode

func (t TermToRefactor) HashCode() uint64

func (*TermToRefactor) SetCoeffID

func (t *TermToRefactor) SetCoeffID(cID int)

func (TermToRefactor) Unpack

func (t TermToRefactor) Unpack() (cID, vID int)

func (TermToRefactor) WireID

func (t TermToRefactor) WireID() int

Jump to

Keyboard shortcuts

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