Documentation ¶
Index ¶
- type LinearExpression
- type LinearExpressionToRefactor
- func (l LinearExpressionToRefactor) Clone() LinearExpressionToRefactor
- func (l LinearExpressionToRefactor) Equal(o LinearExpressionToRefactor) bool
- func (l LinearExpressionToRefactor) HashCode() uint64
- func (l LinearExpressionToRefactor) Len() int
- func (l LinearExpressionToRefactor) Less(i, j int) bool
- func (l LinearExpressionToRefactor) Swap(i, j int)
- type Term
- type TermToRefactor
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 (l LinearExpression) Clone() LinearExpression
func (LinearExpression) Equal ¶
func (l LinearExpression) Equal(o LinearExpression) bool
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 (l LinearExpressionToRefactor) Clone() LinearExpressionToRefactor
func (LinearExpressionToRefactor) Equal ¶
func (l LinearExpressionToRefactor) Equal(o LinearExpressionToRefactor) bool
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 ¶
func (l LinearExpressionToRefactor) Len() int
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 (*Term) SetCoeff ¶
func (t *Term) SetCoeff(c constraint.Coeff)
type TermToRefactor ¶
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