Package | Description |
---|---|
ptolemy.data |
Packages for manipulating data that passes between actors.
|
ptolemy.data.expr |
The Ptolemy II Expression Language.
|
ptolemy.math |
Math classes.
|
Modifier and Type | Method and Description |
---|---|
FixPoint[][] |
FixMatrixToken.fixMatrix()
Return the content of this token as a new 2-D FixPoint matrix.
|
FixPoint[][] |
MatrixToken.fixMatrix()
Return the content of this token as a 2-D fixed point matrix.
|
FixPoint |
FixToken.fixValue()
Return the value of this token as a FixPoint.
|
FixPoint |
ShortToken.fixValue()
Return the value in the token as a fixpoint.
|
FixPoint |
IntToken.fixValue()
Return the value in the token as a fixpoint.
|
FixPoint |
ScalarToken.fixValue()
Return the value of this token as a FixPoint.
|
FixPoint |
FixMatrixToken.getElementAt(int row,
int column)
Return the element of the contained matrix at the specified
row and column.
|
Constructor and Description |
---|
FixMatrixToken(FixPoint[][] value)
Construct a FixMatrixToken with the specified 2-D matrix.
|
FixMatrixToken(FixPoint[][] value,
Precision precision)
Construct a FixMatrixToken with the specified 2-D matrix.
|
FixToken(FixPoint value)
Construct a FixToken with the supplied FixPoint value.
|
UnsizedFixToken(FixPoint value)
Construct an UnsizedFixToken with the supplied FixPoint value.
|
Modifier and Type | Method and Description |
---|---|
static FixPoint |
FixPointFunctions.fix(double value,
int numberOfBits,
int integerBits)
Create a FixPoint representing the specified double.
|
static FixPoint |
FixPointFunctions.fix(int value,
int numberOfBits,
int integerBits)
Create a FixPoint representing the specified integer.
|
Modifier and Type | Method and Description |
---|---|
FixPoint |
FixPoint.abs()
Return a FixPoint with a value equal to the absolute
value of this FixPoint.
|
FixPoint |
FixPoint.add(FixPoint arg)
Return a FixPoint with a value equal to the sum of this
FixPoint and the argument.
|
FixPoint |
FixPoint.add(FixPoint arg,
Quantization quant)
Return a FixPoint with a value equal to the sum of this
FixPoint and the argument.
|
FixPoint |
FixPoint.divide(FixPoint arg)
Return a FixPoint with a value equal to the division of
this FixPoint by the argument.
|
FixPoint |
FixPoint.divide(FixPoint arg,
Quantization quant)
Return a FixPoint equal to the division of this FixPoint by the
argument, after application of a quantization specification to
the result.
|
FixPoint |
FixPoint.minimumQuantization()
Return a new FixPoint value that has the same value as this
FixPoint value but with the minimum quantization necessary for
representing the value.
|
FixPoint |
FixPoint.multiply(FixPoint arg)
Return a FixPoint with a value equal to the product of this
FixPoint and the argument.
|
FixPoint |
FixPoint.multiply(FixPoint arg,
Quantization quant)
Return a FixPoint with a value equal to the product of this
FixPoint and the argument.
|
abstract FixPoint |
Overflow.quantize(java.math.BigInteger integerValue,
Precision precision)
Return a new FixPoint object based on the given BigInteger
value and Precision constraint.
|
FixPoint |
Overflow.Grow.quantize(java.math.BigInteger integerValue,
Precision precision) |
FixPoint |
Overflow.Minimize.quantize(java.math.BigInteger integerValue,
Precision precision) |
FixPoint |
Overflow.Modulo.quantize(java.math.BigInteger integerValue,
Precision precision) |
FixPoint |
Overflow.Saturate.quantize(java.math.BigInteger integerValue,
Precision precision) |
FixPoint |
Overflow.ToZero.quantize(java.math.BigInteger integerValue,
Precision precision) |
FixPoint |
Overflow.Trap.quantize(java.math.BigInteger integerValue,
Precision precision) |
FixPoint |
FixPoint.quantize(Quantization quant)
Return the value after conversion to comply with a
quantization specification.
|
static FixPoint |
Overflow.quantizeGrow(java.math.BigInteger integerValue,
Precision precision)
Quantize a FixPoint value using a "grow" overflow strategy.
|
static FixPoint |
Overflow.quantizeMinimum(java.math.BigInteger bigInt,
Precision p)
Generates a new FixPoint data value based on the unscaled
value bigInt using as few bits as possible.
|
static FixPoint |
Overflow.quantizeModulo(java.math.BigInteger integerValue,
Precision precision)
Quantize a FixPoint value using a "modulo" overflow strategy.
|
static FixPoint |
Overflow.quantizeSaturate(java.math.BigInteger integerValue,
Precision precision)
Quantize a FixPoint value using a "saturate" overflow strategy.
|
static FixPoint |
Overflow.quantizeToZero(java.math.BigInteger integerValue,
Precision precision)
Quantize a FixPoint value using a "to Zero" overflow strategy.
|
static FixPoint |
Quantizer.round(java.math.BigDecimal value,
Precision precision)
Return the fixed point number that is nearest to the specified
value, but has the given precision, possibly introducing
quantization or overflow errors.
|
static FixPoint |
Quantizer.round(double value,
Precision precision)
Return the fixed point number that is nearest to the specified
value, but has the given precision, possibly introducing
quantization or overflow errors.
|
static FixPoint |
Quantizer.round(FixPoint value,
Precision newPrecision,
Overflow mode)
Return the fixed point number that is nearest to the specified
value, but has the given precision, possibly introducing
quantization or overflow errors.
|
static FixPoint |
Quantizer.roundDown(java.math.BigDecimal value,
Precision precision)
Return the nearest fixed point number with less than or equal
magnitude that has the given precision, possibly introducing
quantization or overflow errors.
|
static FixPoint |
Quantizer.roundDown(double value,
Precision precision)
Return the nearest fixed point number with less than or equal
magnitude that has the given precision, possibly introducing
quantization or overflow errors.
|
static FixPoint |
Quantizer.roundDown(FixPoint value,
Precision newPrecision,
Overflow mode)
Return the nearest fixed point number with less than or equal
magnitude that has the given precision, possibly introducing
quantization or overflow errors.
|
static FixPoint |
Quantizer.roundNearestEven(java.math.BigDecimal value,
Precision precision)
Return the fixed point number that is nearest to the specified
value, but has the given precision, possibly introducing
quantization or overflow errors.
|
static FixPoint |
Quantizer.roundNearestEven(double value,
Precision precision)
Return the fixed point number that is nearest to the specified
value, but has the given precision, possibly introducing
quantization or overflow errors.
|
static FixPoint |
Quantizer.roundNearestEven(FixPoint value,
Precision newPrecision,
Overflow mode)
Return the fixed point number that is nearest to the specified
value, but has the given precision, possibly introducing
quantization or overflow errors.
|
static FixPoint |
Quantizer.roundToZero(java.math.BigDecimal value,
Precision precision)
Return the fixed point number that is nearest to the specified
value, but has magnitude no greater that the specified value,
and has the given precision, possibly introducing
quantization or overflow errors.
|
static FixPoint |
Quantizer.roundToZero(double value,
Precision precision)
Return the fixed point number that is nearest to the specified
value, but has magnitude no greater that the specified value,
and has the given precision, possibly introducing
quantization or overflow errors.
|
static FixPoint |
Quantizer.roundToZero(FixPoint value,
Precision newPrecision,
Overflow mode)
Return the fixed point number that is nearest to the specified
value, but has magnitude no greater than the specified value,
and has the given precision, possibly introducing
quantization or overflow errors.
|
static FixPoint |
Quantizer.roundUp(java.math.BigDecimal value,
Precision precision)
Return the smallest greater than or equal fixed point number
that has the given precision, possibly introducing
quantization or overflow errors.
|
static FixPoint |
Quantizer.roundUp(double value,
Precision precision)
Return the smallest greater than or equal fixed point number
that has the given precision, possibly introducing
quantization or overflow errors.
|
static FixPoint |
Quantizer.roundUp(FixPoint value,
Precision newPrecision,
Overflow mode)
Return the smallest greater than or equal fixed point number
that has the given precision, possibly introducing
quantization or overflow errors.
|
FixPoint |
FixPoint.subtract(FixPoint arg)
Return a FixPoint with a value equal to the difference
between this FixPoint and the argument.
|
FixPoint |
FixPoint.subtract(FixPoint arg,
Quantization quant)
Return a FixPoint with a value equal to the difference of this
FixPoint and the argument.
|
static FixPoint |
Quantizer.truncate(java.math.BigDecimal value,
Precision precision)
Deprecated.
Use roundToZero instead.
|
static FixPoint |
Quantizer.truncate(double value,
Precision precision)
Deprecated.
Use roundToZero instead.
|
static FixPoint |
Quantizer.truncate(FixPoint value,
Precision newPrecision,
Overflow mode)
Deprecated.
Use roundToZero instead.
|
Modifier and Type | Method and Description |
---|---|
FixPoint |
FixPoint.add(FixPoint arg)
Return a FixPoint with a value equal to the sum of this
FixPoint and the argument.
|
FixPoint |
FixPoint.add(FixPoint arg,
Quantization quant)
Return a FixPoint with a value equal to the sum of this
FixPoint and the argument.
|
FixPoint |
FixPoint.divide(FixPoint arg)
Return a FixPoint with a value equal to the division of
this FixPoint by the argument.
|
FixPoint |
FixPoint.divide(FixPoint arg,
Quantization quant)
Return a FixPoint equal to the division of this FixPoint by the
argument, after application of a quantization specification to
the result.
|
FixPoint |
FixPoint.multiply(FixPoint arg)
Return a FixPoint with a value equal to the product of this
FixPoint and the argument.
|
FixPoint |
FixPoint.multiply(FixPoint arg,
Quantization quant)
Return a FixPoint with a value equal to the product of this
FixPoint and the argument.
|
static FixPoint |
Quantizer.round(FixPoint value,
Precision newPrecision,
Overflow mode)
Return the fixed point number that is nearest to the specified
value, but has the given precision, possibly introducing
quantization or overflow errors.
|
static FixPoint |
Quantizer.roundDown(FixPoint value,
Precision newPrecision,
Overflow mode)
Return the nearest fixed point number with less than or equal
magnitude that has the given precision, possibly introducing
quantization or overflow errors.
|
static FixPoint |
Quantizer.roundNearestEven(FixPoint value,
Precision newPrecision,
Overflow mode)
Return the fixed point number that is nearest to the specified
value, but has the given precision, possibly introducing
quantization or overflow errors.
|
static FixPoint |
Quantizer.roundToZero(FixPoint value,
Precision newPrecision,
Overflow mode)
Return the fixed point number that is nearest to the specified
value, but has magnitude no greater than the specified value,
and has the given precision, possibly introducing
quantization or overflow errors.
|
static FixPoint |
Quantizer.roundUp(FixPoint value,
Precision newPrecision,
Overflow mode)
Return the smallest greater than or equal fixed point number
that has the given precision, possibly introducing
quantization or overflow errors.
|
FixPoint |
FixPoint.subtract(FixPoint arg)
Return a FixPoint with a value equal to the difference
between this FixPoint and the argument.
|
FixPoint |
FixPoint.subtract(FixPoint arg,
Quantization quant)
Return a FixPoint with a value equal to the difference of this
FixPoint and the argument.
|
static FixPoint |
Quantizer.truncate(FixPoint value,
Precision newPrecision,
Overflow mode)
Deprecated.
Use roundToZero instead.
|
Constructor and Description |
---|
FixPoint(FixPoint fix,
Quantization quant)
Construct a new FixPoint object by requantizing the
given FixPoint object with a new quantization specification.
|