class ORTools::Sat::LinearExpression

Overview

LinearExpression class provides an expression of variables and fixed coefficients The expression is used as input to constraints that accept linear expressions

Defined in:

ortools-sat/linear-expression.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(variables : Array(Int32) = [] of Int32, coefficients : Array(Int64) = [] of Int64, constant : Int64 = 0_i64) #

[View source]

Class Method Detail

def self.zero #

Needed to allow sum of an array of LinearExpression


[View source]

Instance Method Detail

def !=(other : Expressible) #

[View source]
def +(other : Expressible) #

[View source]
def -(other : Expressible) #

[View source]
def - #

[View source]
def <(other : Expressible) #

[View source]
def <=(other : Expressible) #

[View source]
def ==(other : Expressible) #

[View source]
def >(other : Expressible) #

[View source]
def >=(other : Expressible) #

[View source]
def coefficients : Array(Int64) #

[View source]
def constant : Int64 #

[View source]
def proto #

[View source]
def to_lexpr : LinearExpression #

[View source]
def variables : Array(Int32) #

[View source]