Package ptolemy.data

Examples of ptolemy.data.DoubleToken


        setGamma = new Parameter(this, "setGamma");
        setGamma.setTypeEquals(BaseType.BOOLEAN);
        setGamma.setToken(BooleanToken.FALSE);

        gamma = new Parameter(this, "gamma", new DoubleToken(0.455F));

        setBackground = new Parameter(this, "setBackground");
        setBackground.setTypeEquals(BaseType.BOOLEAN);
        setBackground.setToken(BooleanToken.FALSE);
View Full Code Here


        super(container, name);
        input.setTypeEquals(BaseType.DOUBLE_MATRIX);
        output.setTypeEquals(BaseType.DOUBLE_MATRIX);

        probability = new Parameter(this, "probability",
                new DoubleToken("0.1F"));
    }
View Full Code Here

        trigger = new TypedIOPort(this, "trigger", true, false);
        trigger.setMultiport(false);
        trigger.setTypeEquals(BaseType.DOUBLE);
        new Parameter(trigger, "signalType", new StringToken("CONTINUOUS"));

        level = new Parameter(this, "level", new DoubleToken(0.0));
        level.setTypeEquals(BaseType.DOUBLE);

        // By default, this director detects both directions of leve crossings.
        direction = new StringParameter(this, "direction");
        direction.setExpression("both");
        _detectRisingCrossing = true;
        _detectFallingCrossing = true;

        direction.addChoice("both");
        direction.addChoice("falling");
        direction.addChoice("rising");

        defaultEventValue = new Parameter(this, "defaultEventValue",
                new DoubleToken(0.0));

        // FIXME: If usingDefaultEventValue is false, the output
        // type should be constrained to match the trigger input type.
        output.setTypeAtLeast(defaultEventValue);

        useDefaultEventValue = new Parameter(this, "useDefaultEventValue");
        useDefaultEventValue.setTypeEquals(BaseType.BOOLEAN);
        useDefaultEventValue.setToken(BooleanToken.FALSE);

        _errorTolerance = 1e-4;
        errorTolerance = new Parameter(this, "errorTolerance", new DoubleToken(
                _errorTolerance));
        errorTolerance.setTypeEquals(BaseType.DOUBLE);
    }
View Full Code Here

                    if (_debugging) {
                        _debug("Emitting an event with a default value: "
                                + defaultEventValue.getToken());
                    }
                } else {
                    output.send(0, new DoubleToken(_level));

                    if (_debugging) {
                        _debug("Emitting an event with the level value: "
                                + _level);
                    }
View Full Code Here

        input.setMultiport(true);
        new Parameter(input, "signalType", new StringToken("CONTINUOUS"));
        output.setMultiport(true);
        new Parameter(output, "signalType", new StringToken("DISCRETE"));
        _samplePeriod = 0.1;
        samplePeriod = new Parameter(this, "samplePeriod", new DoubleToken(
                _samplePeriod));

        _attachText("_iconDescription", "<svg>\n"
                + "<rect x=\"-30\" y=\"-20\" " + "width=\"60\" height=\"40\" "
                + "style=\"fill:white\"/>\n"
View Full Code Here

        specifySize.setToken(BooleanToken.TRUE);

        width = new Parameter(this, "width", new IntToken(800));
        height = new Parameter(this, "height", new IntToken(600));

        xScaleFactor = new Parameter(this, "xScaleFactor", new DoubleToken(
                "1.0F"));
        yScaleFactor = new Parameter(this, "yScaleFactor", new DoubleToken(
                "1.0F"));

        interpolationType = new StringAttribute(this, "interpolationType");
        interpolationType.setExpression("bilinear");
        _interpolationType = _BILINEAR;
View Full Code Here

        initialTrace.setTypeEquals(new ArrayType(BaseType.DOUBLE));
        initialTrace.setVisibility(Settable.EXPERT);

        periodic = new Parameter(this, "periodic", BooleanToken.TRUE);
        periodic.setTypeEquals(BaseType.BOOLEAN);
        yBottom = new Parameter(this, "yBottom", new DoubleToken(-1.0));
        yBottom.setTypeEquals(BaseType.DOUBLE);
        yTop = new Parameter(this, "yTop", new DoubleToken(1.0));
        yTop.setTypeEquals(BaseType.DOUBLE);

        runOnModification = new Parameter(this, "runOnModification",
                BooleanToken.FALSE);
        runOnModification.setTypeEquals(BaseType.BOOLEAN);
View Full Code Here

            try {
                // Data has been modified on screen by the user.
                Token[] record = new Token[_data[1].length];

                for (int i = 0; i < _data[1].length; i++) {
                    record[i] = new DoubleToken(_data[1][i]);
                }

                ArrayToken newValue = new ArrayToken(BaseType.DOUBLE, record);
                initialTrace.setToken(newValue);
            } finally {
View Full Code Here

        int width = input.getWidth();
        int offset = ((IntToken) startingDataset.getToken()).intValue();

        for (int i = width - 1; i >= 0; i--) {
            if (input.hasToken(i)) {
                DoubleToken currentToken = (DoubleToken) input.get(i);
                double currentValue = currentToken.doubleValue();

                // NOTE: We assume the superclass ensures this cast is safe.
                ((Plot) plot).addPoint(i + offset, currentTime, currentValue,
                        true);
            }
View Full Code Here

     */
    public JAITranslate(CompositeEntity container, String name)
            throws IllegalActionException, NameDuplicationException {
        super(container, name);

        xShift = new Parameter(this, "xShift", new DoubleToken("0.0F"));
        yShift = new Parameter(this, "yShift", new DoubleToken("0.0F"));

        interpolationType = new StringAttribute(this, "interpolationType");
        interpolationType.setExpression("bilinear");
        _interpolationType = _BILINEAR;

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.