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.Element) 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 length 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 Term ¶
type Term struct { VID int Coeff constraint.Element }
func (*Term) SetCoeff ¶
func (t *Term) SetCoeff(c constraint.Element)
Click to show internal directories.
Click to hide internal directories.