Module com.darkcollective.relix.ast
Package com.darkcollective.relix.ast
Record Class OptimizeConstraint
java.lang.Object
java.lang.Record
com.darkcollective.relix.ast.OptimizeConstraint
- Record Components:
expr- the per-row coefficient expression summed over the chosen rows; never nullop- the comparison operator relating the sum tobound; never nullbound- the right-hand-side constant
A single linear constraint of an
OptimizeNode:
SUM(expr) op bound.
expr is evaluated per candidate row to that row's coefficient; the
constraint bounds the sum of those coefficients over the chosen rows. Only the
comparison operators <=, >=, and =
(ComparisonOperator.LESS_EQUAL, ComparisonOperator.GREATER_EQUAL,
ComparisonOperator.EQUAL) are meaningful here; semantic validation
rejects the others.
-
Constructor Summary
ConstructorsConstructorDescriptionOptimizeConstraint(Operand expr, ComparisonOperator op, double bound) Creates an instance of aOptimizeConstraintrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoublebound()Returns the value of theboundrecord component.final booleanIndicates whether some other object is "equal to" this one.expr()Returns the value of theexprrecord component.final inthashCode()Returns a hash code value for this object.op()Returns the value of theoprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
expr
Returns the value of theexprrecord component.- Returns:
- the value of the
exprrecord component
-
op
Returns the value of theoprecord component.- Returns:
- the value of the
oprecord component
-
bound
public double bound()Returns the value of theboundrecord component.- Returns:
- the value of the
boundrecord component
-