Documentation
      ¶
    
    
  
    
  
    Index ¶
- type LinearExpression
 - func (l LinearExpression[E]) Clone() LinearExpression[E]
 - func (l LinearExpression[E]) Equal(o LinearExpression[E]) bool
 - func (l LinearExpression[E]) HashCode() [16]byte
 - func (l LinearExpression[E]) Len() int
 - func (l LinearExpression[E]) Less(i, j int) bool
 - func (l LinearExpression[E]) Swap(i, j int)
 
- type Term
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LinearExpression ¶
type LinearExpression[E constraint.Element] []Term[E]
func NewLinearExpression ¶
func NewLinearExpression[E constraint.Element](vID int, cID E) LinearExpression[E]
NewLinearExpression helper to initialize a linear expression with one term
func (LinearExpression[E]) Clone ¶
func (l LinearExpression[E]) Clone() LinearExpression[E]
func (LinearExpression[E]) Equal ¶
func (l LinearExpression[E]) Equal(o LinearExpression[E]) bool
Equals returns true if both SORTED expressions are the same
pre conditions: l and o are sorted
func (LinearExpression[E]) HashCode ¶
func (l LinearExpression[E]) HashCode() [16]byte
HashCode returns a collision-resistant identifier of the linear expression. It is constructed from the hash codes of the terms.
func (LinearExpression[E]) Len ¶
func (l LinearExpression[E]) Len() int
Len return the length of the Variable (implements Sort interface)
func (LinearExpression[E]) Less ¶
func (l LinearExpression[E]) 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[E]) Swap ¶
func (l LinearExpression[E]) Swap(i, j int)
Swap swaps terms in the Variable (implements Sort interface)
 Click to show internal directories. 
   Click to hide internal directories.