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 doublegetValue()org.apache.commons.math3.fraction.FractiongetX()booleanisOnlyIfNeg()booleanisOnlyIfNegOp1()booleanisOnlyIfNegOp2()voidsetX(org.apache.commons.math3.fraction.Fraction newX)StringtoString()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:
toStringin classLazyWeight
-
isOnlyIfNeg
public boolean isOnlyIfNeg()- Returns:
- the onlyIfNeg
-
getX
public org.apache.commons.math3.fraction.Fraction getX()- Specified by:
getXin classLazyWeight- Returns:
- the x
-
isOnlyIfNegOp1
public boolean isOnlyIfNegOp1()- Returns:
- the onlyIfNegOp1
-
isOnlyIfNegOp2
public boolean isOnlyIfNegOp2()- Returns:
- the onlyIfNegOp2
-
getValue
public double getValue()- Specified by:
getValuein classLazyWeight
-
setX
public void setX(org.apache.commons.math3.fraction.Fraction newX)- Specified by:
setXin classLazyWeight
-