Package it.univr.di.labeledvalue.lazy
Class LazyCombiner
java.lang.Object
it.univr.di.labeledvalue.lazy.LazyWeight
it.univr.di.labeledvalue.lazy.LazyCombiner
- Direct Known Subclasses:
LazyMax
public class LazyCombiner extends LazyWeight
Represent the sum of two other LazyWeight
- Author:
- posenato
-
Nested Class Summary
Nested classes/interfaces inherited from class it.univr.di.labeledvalue.lazy.LazyWeight
LazyWeight.SubType
-
Constructor Summary
Constructors Constructor Description LazyCombiner(org.apache.commons.math3.fraction.Fraction x1, LazyWeight op1, LazyWeight op2, boolean onlyIfNeg, boolean onlyIfNegOp1, boolean onlyIfNegOp2)
-
Method Summary
Modifier and Type Method Description double
getValue()
org.apache.commons.math3.fraction.Fraction
getX()
boolean
isOnlyIfNeg()
boolean
isOnlyIfNegOp1()
boolean
isOnlyIfNegOp2()
void
setX(org.apache.commons.math3.fraction.Fraction newX)
String
toString()
Methods inherited from class it.univr.di.labeledvalue.lazy.LazyWeight
equals, formatLazy, getType, hashCode, max, sum, sumWithOverflowCheck
-
Constructor Details
-
LazyCombiner
public LazyCombiner(org.apache.commons.math3.fraction.Fraction x1, LazyWeight op1, LazyWeight op2, boolean onlyIfNeg, boolean onlyIfNegOp1, boolean onlyIfNegOp2)
-
-
Method Details
-
toString
- Overrides:
toString
in classLazyWeight
-
isOnlyIfNeg
public boolean isOnlyIfNeg()- Returns:
- the onlyIfNeg
-
getX
public org.apache.commons.math3.fraction.Fraction getX()- Specified by:
getX
in classLazyWeight
- Returns:
- the x
-
isOnlyIfNegOp1
public boolean isOnlyIfNegOp1()- Returns:
- the onlyIfNegOp1
-
isOnlyIfNegOp2
public boolean isOnlyIfNegOp2()- Returns:
- the onlyIfNegOp2
-
getValue
public double getValue()- Specified by:
getValue
in classLazyWeight
-
setX
public void setX(org.apache.commons.math3.fraction.Fraction newX)- Specified by:
setX
in classLazyWeight
-