Package ptolemy.data

Examples of ptolemy.data.DoubleToken


                if (_inCount > 0) {
                    double xLocation = (double) _sumX / _inCount;
                    double yLocation = _frameHeight
                            - ((double) _sumY / _inCount);
                    outputX.send(0, new DoubleToken(xLocation));
                    outputY.send(0, new DoubleToken(yLocation));

                    if (_debugging) {
                        _debug("just sent " + (int) xLocation + "and "
                                + (int) yLocation);
                    }
View Full Code Here


            throws NameDuplicationException, IllegalActionException {
        super(container, name);

        output.setTypeEquals(BaseType.DOUBLE);

        freedom = new PortParameter(this, "freedom", new DoubleToken(1.0));
        freedom.setTypeEquals(BaseType.DOUBLE);
        new SingletonParameter(freedom.getPort(), "_showName")
                .setToken(BooleanToken.TRUE);

        freedom.moveToFirst();
View Full Code Here

     @exception IllegalActionException If there is no director.
     */
    public void fire() throws IllegalActionException {
        freedom.update();
        super.fire();
        output.send(0, new DoubleToken(_current));
    }
View Full Code Here

        output.setTypeEquals(BaseType.DOUBLE);

        inputIsPower = new Parameter(this, "inputIsPower", new BooleanToken(
                false));
        inputIsPower.setTypeEquals(BaseType.BOOLEAN);
        min = new Parameter(this, "min", new DoubleToken(-100.0));
        min.setTypeEquals(BaseType.DOUBLE);
    }
View Full Code Here

     @exception IllegalActionException If there is no director.
     */
    public void fire() throws IllegalActionException {
        super.fire();
        if (input.hasToken(0)) {
            DoubleToken in = (DoubleToken) input.get(0);
            double number = in.doubleValue();
            double minValue = ((DoubleToken) min.getToken()).doubleValue();
            output.send(0, _doFunction(number, minValue));
        }
    }
View Full Code Here

            if (outNumber < minValue) {
                outNumber = minValue;
            }
        }

        return new DoubleToken(outNumber);
    }
View Full Code Here

            throws NameDuplicationException, IllegalActionException {
        super(container, name);

        output.setTypeEquals(BaseType.INT);

        mean = new PortParameter(this, "mean", new DoubleToken(1.0));
        mean.setTypeEquals(BaseType.DOUBLE);
        new SingletonParameter(mean.getPort(), "_showName")
                .setToken(BooleanToken.TRUE);

        mean.moveToFirst();
View Full Code Here

            throws NameDuplicationException, IllegalActionException {
        super(container, name);

        output.setTypeEquals(BaseType.DOUBLE);

        freedom = new PortParameter(this, "freedom", new DoubleToken(1.0));
        freedom.setTypeEquals(BaseType.DOUBLE);
        new SingletonParameter(freedom.getPort(), "_showName")
                .setToken(BooleanToken.TRUE);

        freedom.moveToFirst();
View Full Code Here

     @exception IllegalActionException If there is no director.
     */
    public void fire() throws IllegalActionException {
        freedom.update();
        super.fire();
        output.send(0, new DoubleToken(_current));
    }
View Full Code Here

            throws NameDuplicationException, IllegalActionException {
        super(container, name);

        output.setTypeEquals(BaseType.DOUBLE);

        mean = new PortParameter(this, "mean", new DoubleToken(1.0));
        mean.setTypeEquals(BaseType.DOUBLE);
        new SingletonParameter(mean.getPort(), "_showName")
                .setToken(BooleanToken.TRUE);

        gamma = new PortParameter(this, "gamma", new DoubleToken(1.0));
        gamma.setTypeEquals(BaseType.DOUBLE);
        new SingletonParameter(gamma.getPort(), "_showName")
                .setToken(BooleanToken.TRUE);

        cut = new PortParameter(this, "cut", new DoubleToken(1.0));
        cut.setTypeEquals(BaseType.DOUBLE);
        new SingletonParameter(cut.getPort(), "_showName")
                .setToken(BooleanToken.TRUE);

        cut.moveToFirst();
View Full Code Here

TOP

Related Classes of ptolemy.data.DoubleToken

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.