ptolemy.math
Class Overflow.Saturate
java.lang.Object
ptolemy.math.Overflow
ptolemy.math.Overflow.Saturate
- All Implemented Interfaces:
- java.lang.Cloneable, java.io.Serializable
- Enclosing class:
- Overflow
- public static class Overflow.Saturate
- extends Overflow
The saturate overflows strategy
- See Also:
- Serialized Form
|
Method Summary |
java.math.BigInteger |
minusInfinity(Quantization quant)
Return the value of minus infinity, or null if unrepresentable.
|
java.math.BigInteger |
plusInfinity(Quantization quant)
Return the value of plus infinity, or null if unrepresentable.
|
java.math.BigInteger |
quantize(java.math.BigInteger integerValue,
Quantization quant)
Return the integerValue after applying the overflow constraints of
quant. |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
minusInfinity
public java.math.BigInteger minusInfinity(Quantization quant)
- Description copied from class:
Overflow
- Return 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:
minusInfinity in class Overflow
- 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:
Overflow
- Return 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:
plusInfinity in class Overflow
- Parameters:
quant - The quantization specification.
- Returns:
- The value if defined, null if not.
quantize
public java.math.BigInteger quantize(java.math.BigInteger integerValue,
Quantization quant)
- Description copied from class:
Overflow
- Return the integerValue after applying the overflow constraints of
quant.
- Specified by:
quantize in class Overflow
- Parameters:
integerValue - The unbounded integer value.quant - The quantization constraints.
- Returns:
- The bounded integer value.