Package ptolemy.data

Examples of ptolemy.data.DoubleToken.doubleValue()


            // NOTE: The following code is ported from Ptolemy Classic.
            double k;
            int M = _backward.length - 1;

            // Forward prediction error
            _forwardCache[0] = inputValue.doubleValue(); // _forward(0) = x(n)

            for (int i = 1; i <= M; i++) {
                k = _reflectionCoefs[M - i];
                _forwardCache[i] = (k * _backwardCache[i])
                        + _forwardCache[i - 1];
View Full Code Here


     @exception IllegalActionException If there is no director.
     */
    public void fire() throws IllegalActionException {
        super.fire();
        DoubleToken in = (DoubleToken) input.get(0);
        FixPoint fixValue = new FixPoint(in.doubleValue(), _quantization);
        FixToken result = new FixToken(fixValue);
        output.send(0, result);
    }

    /** Return false if the input port has no token, otherwise return
View Full Code Here

                if (vergilZoom != null) {
                    try {
                        DoubleToken vergilZoomToken = (DoubleToken) vergilZoom
                                .getToken();
                        double zoom = vergilZoomToken.doubleValue();

                        if (zoom != 1.0) {
                            analysis.append(" Zoom(" + zoom + ") != 1.0");
                        }
                    } catch (IllegalActionException ex) {
View Full Code Here

        for (int i = width - 1; i >= 0; i--) {
            if (input.hasToken(i)) {
                currentTime = input.getModelTime(i);

                DoubleToken currentToken = (DoubleToken) input.get(i);
                double currentValue = currentToken.doubleValue();
                outVal.send(0, new DoubleToken(currentValue));
                outTime.send(0, new DoubleToken(currentTime.getDoubleValue()));
            }
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.