Package ptolemy.math

Examples of ptolemy.math.Overflow$Grow


        if (port.getType() == BaseType.FIX && token instanceof FixToken) {
            Precision precision = new Precision(((Parameter) getAttribute(port
                    .getName()
                    + "Precision")).getExpression());

            Overflow overflow = Overflow.getName(((Parameter) getAttribute(port
                    .getName()
                    + "Overflow")).getExpression().toLowerCase());

            Rounding rounding = Rounding.getName(((Parameter) getAttribute(port
                    .getName()
View Full Code Here


    public void fire() throws IllegalActionException {
        super.fire();

        Precision precision = new Precision(getPortPrecision(output));

        Overflow overflow = Overflow
                .getName(((Parameter) getAttribute("outputOverflow"))
                        .getExpression().toLowerCase());

        Rounding rounding = Rounding
                .getName(((Parameter) getAttribute("outputRounding"))
View Full Code Here

            if (_currentIndex < valuesArray.length()) {
                Precision precision = new Precision(
                        ((Parameter) getAttribute("outputPrecision"))
                                .getExpression());

                Overflow overflow = Overflow
                        .getName(((Parameter) getAttribute("outputOverflow"))
                                .getExpression().toLowerCase());

                Rounding rounding = Rounding
                        .getName(((Parameter) getAttribute("outputRounding"))
View Full Code Here

                    intResult = bigIntA.xor(bigIntB).not();
                }
            }

            if (intResult != null) {
                Overflow overflow = Overflow
                        .getName(((Parameter) getAttribute("outputOverflow"))
                                .getExpression().toLowerCase());

                Rounding rounding = Rounding
                        .getName(((Parameter) getAttribute("outputRounding"))
View Full Code Here

        }

        Precision precision = new Precision(
                ((Parameter) getAttribute("outputPrecision")).getExpression());

        Overflow overflow = Overflow
                .getName(((Parameter) getAttribute("outputOverflow"))
                        .getExpression().toLowerCase());

        Rounding rounding = Rounding
                .getName(((Parameter) getAttribute("outputRounding"))
View Full Code Here

            _quantization = _quantization.setPrecision(precision);
        } else if (attribute == rounding) {
            Rounding r = Rounding.getName(rounding.getExpression());
            _quantization = _quantization.setRounding(r);
        } else if (attribute == overflow) {
            Overflow o = Overflow.forName(overflow.getExpression());
            _quantization = _quantization.setOverflow(o);
        } else {
            super.attributeChanged(attribute);
        }
    }
View Full Code Here

            }
        } else if (attribute == rounding) {
            Rounding r = Rounding.getName(rounding.getExpression());
            _quantization = _quantization.setRounding(r);
        } else if (attribute == overflow) {
            Overflow o = Overflow.forName(overflow.getExpression());
            _quantization = _quantization.setOverflow(o);
            if (_quantization.getOverflow() == Overflow.GROW) {
                output.setTypeEquals(BaseType.UNSIZED_FIX);
            } else {
                output.setTypeEquals(new FixType(_quantization.getPrecision()));
View Full Code Here

            }
            Precision precision = new Precision(
                    ((Parameter) getAttribute("outputPrecision"))
                            .getExpression());

            Overflow overflow = Overflow
                    .getName(((Parameter) getAttribute("outputOverflow"))
                            .getExpression().toLowerCase());

            Rounding rounding = Rounding
                    .getName(((Parameter) getAttribute("outputRounding"))
                            .getExpression().toLowerCase());

            FixPoint result = new FixPoint(((ScalarToken) initialValue
                    .getToken()).doubleValue(), new FixPointQuantization(
                    precision, overflow, rounding));
            output.setInitToken(new FixToken(result));
        }
        if (attribute == initialValue) {
            Precision precision = new Precision(
                    ((Parameter) getAttribute("outputPrecision"))
                            .getExpression());

            Overflow overflow = Overflow
                    .getName(((Parameter) getAttribute("outputOverflow"))
                            .getExpression().toLowerCase());

            Rounding rounding = Rounding
                    .getName(((Parameter) getAttribute("outputRounding"))
View Full Code Here

     */
    public void initialize() throws IllegalActionException {
        Precision precision = new Precision(
                ((Parameter) getAttribute("outputPrecision")).getExpression());

        Overflow overflow = Overflow
                .getName(((Parameter) getAttribute("outputOverflow"))
                        .getExpression().toLowerCase());

        Rounding rounding = Rounding
                .getName(((Parameter) getAttribute("outputRounding"))
View Full Code Here

                throw new IllegalActionException(this, "Bit width of "
                        + (newEndValue - newStartValue)
                        + " is not equal to precision " + precision);
            }

            Overflow overflow = Overflow
                    .getName(((Parameter) getAttribute("outputOverflow"))
                            .getExpression().toLowerCase());

            Rounding rounding = Rounding
                    .getName(((Parameter) getAttribute("outputRounding"))
View Full Code Here

TOP

Related Classes of ptolemy.math.Overflow$Grow

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.