ptolemy.math
Class Overflow.ToZero

java.lang.Object
  extended byptolemy.math.Overflow
      extended byptolemy.math.Overflow.ToZero
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable
Enclosing class:
Overflow

public static class Overflow.ToZero
extends Overflow

The overflow to zero strategy

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class ptolemy.math.Overflow
Overflow.General, Overflow.Grow, Overflow.Modulo, Overflow.Saturate, Overflow.ToZero, Overflow.Trap, Overflow.Unknown
 
Field Summary
 
Fields inherited from class ptolemy.math.Overflow
CLIP, GENERAL, GROW, MODULO, SATURATE, THROW, TO_ZERO, TRAP, UNKNOWN, WRAP
 
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 ptolemy.math.Overflow
clone, equals, forName, getName, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

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.