Package ptolemy.math
Class Overflow.Saturate
- java.lang.Object
-
- ptolemy.math.Overflow
-
- ptolemy.math.Overflow.Saturate
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.math.Overflow
Overflow.Grow, Overflow.Minimize, Overflow.Modulo, Overflow.Saturate, Overflow.ToZero, Overflow.Trap
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.math.BigIntegerminusInfinity(Quantization quant)Return the value of minus infinity, or null if unrepresentable.java.math.BigIntegerplusInfinity(Quantization quant)Return the value of plus infinity, or null if unrepresentable.FixPointquantize(java.math.BigInteger integerValue, Precision precision)Return a new FixPoint object based on the given BigInteger value and Precision constraint.-
Methods inherited from class ptolemy.math.Overflow
clone, equals, forName, getName, hashCode, isOutOfRange, isOverflow, isUnderflow, nameIterator, quantizeGrow, quantizeMinimum, quantizeModulo, quantizeSaturate, quantizeToZero, toString
-
-
-
-
Method Detail
-
minusInfinity
public java.math.BigInteger minusInfinity(Quantization quant)
Description copied from class:OverflowReturn the value of minus infinity, or null if unrepresentable.The saturation value is returned for the saturate and to_zero strategies for which infinity is quantizable. Null is returned for other strategies.
- Overrides:
minusInfinityin classOverflow- Parameters:
quant- The quantization specification.- Returns:
- The value if defined, null if not..
-
plusInfinity
public java.math.BigInteger plusInfinity(Quantization quant)
Description copied from class:OverflowReturn the value of plus infinity, or null if unrepresentable.The saturation value is returned for the saturate and to_zero strategies for which infinity is quantizable. Null is returned for other strategies.
- Overrides:
plusInfinityin classOverflow- Parameters:
quant- The quantization specification.- Returns:
- The value if defined, null if not.
-
quantize
public FixPoint quantize(java.math.BigInteger integerValue, Precision precision)
Description copied from class:OverflowReturn a new FixPoint object based on the given BigInteger value and Precision constraint. This method will return a valid FixPoint object that conforms to the given overflow strategy implemented by the extending class.
-
-