ptolemy.math
Class Overflow.Trap

java.lang.Object
  extended by ptolemy.math.Overflow
      extended by ptolemy.math.Overflow.Trap
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Enclosing class:
Overflow

public static class Overflow.Trap
extends Overflow

The trap overflows strategy.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class ptolemy.math.Overflow
Overflow.Grow, Overflow.Minimize, Overflow.Modulo, Overflow.Saturate, Overflow.ToZero, Overflow.Trap
 
Field Summary
 
Fields inherited from class ptolemy.math.Overflow
CLIP, GENERAL, GROW, MINIMIZE, MODULO, SATURATE, THROW, TO_ZERO, TRAP, WRAP
 
Constructor Summary
private Overflow.Trap()
           
 
Method Summary
 FixPoint quantize(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
_addOverflow, clone, equals, forName, getName, hashCode, isOutOfRange, isOverflow, isUnderflow, minusInfinity, nameIterator, plusInfinity, quantizeGrow, quantizeMinimum, quantizeModulo, quantizeSaturate, quantizeToZero, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Overflow.Trap

private Overflow.Trap()
Method Detail

quantize

public FixPoint quantize(java.math.BigInteger integerValue,
                         Precision precision)
Description copied from class: Overflow
Return 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.

Specified by:
quantize in class Overflow
Parameters:
integerValue - The unbounded integer value.
precision - The Precision constraint of the quantization.
Returns:
A valid FixPoint value that conforms to the overflow strategy.