Package ptolemy.data.expr

Examples of ptolemy.data.expr.Parameter


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

        adam7Interlacing = new Parameter(this, "adam7Interlacing");
        adam7Interlacing.setTypeEquals(BaseType.BOOLEAN);
        adam7Interlacing.setToken(BooleanToken.TRUE);

        bitDepth = new Parameter(this, "bitDepth", new IntToken(8));

        fileName.setExpression("file.png");

        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);

        background = new Parameter(this, "background", new ArrayToken(
                BaseType.INT, _initialArray));
    }
View Full Code Here


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

        xShift = new Parameter(this, "xShift", new IntToken(0));
        yShift = new Parameter(this, "yShift", new IntToken(0));
    }
View Full Code Here

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

        fileName.setExpression("file.tiff");

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

            throws IllegalActionException, NameDuplicationException {
        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

        executionOnFiring.addChoice("run in calling thread");
        executionOnFiring.addChoice("run in a new thread");
        executionOnFiring.addChoice("do nothing");

        // Create the lingerTime parameter.
        lingerTime = new Parameter(this, "lingerTime");
        lingerTime.setTypeEquals(BaseType.LONG);
        lingerTime.setExpression("0L");

        // Create the postfireAction parameter.
        postfireAction = new StringParameter(this, "postfireAction");
View Full Code Here

        start = new TypedIOPort(this, "start");
        start.setInput(true);

        // type is undeclared.
        // Annotate DISCRETE, for the benefit of CT.
        new Parameter(start, "signalType", new StringToken("DISCRETE"));

        // stop port.
        stop = new TypedIOPort(this, "stop");
        stop.setInput(true);

        // type is undeclared.
        // Annotate DISCRETE, for the benefit of CT.
        new Parameter(stop, "signalType", new StringToken("DISCRETE"));
    }
View Full Code Here

     * @exception IllegalActionException If there was an internal problem.
     */
    public Integrator(CompositeEntity container, String name)
            throws NameDuplicationException, IllegalActionException {
        super(container, name);
        new Parameter(input, "signalType", new StringToken("CONTINUOUS"));

        //        new Parameter(discreteInput, "signalType", new StringToken("DISCRETE"));
        new Parameter(output, "signalType", new StringToken("CONTINUOUS"));
    }
View Full Code Here

    public LevelCrossingDetector(CompositeEntity container, String name)
            throws IllegalActionException, NameDuplicationException {
        super(container, name);

        output = new TypedIOPort(this, "output", false, true);
        new Parameter(output, "signalType", new StringToken("DISCRETE"));

        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

            throws NameDuplicationException, IllegalActionException {
        super(container, name);
        input = new TypedIOPort(this, "input", true, false);
        input.setTypeEquals(BaseType.MATRIX);

        width = new Parameter(this, "width", new IntToken(500));
        width.setTypeEquals(BaseType.INT);
        height = new Parameter(this, "height", new IntToken(300));
        height.setTypeEquals(BaseType.INT);
    }
View Full Code Here

        super(container, name);

        // Set the type of the output port.
        output.setTypeEquals(BaseType.INT);

        minimum = new Parameter(this, "minimum", new IntToken(-10));
        minimum.setTypeEquals(BaseType.INT);
        maximum = new Parameter(this, "maximum", new IntToken(10));
        maximum.setTypeEquals(BaseType.INT);
        majorTickSpacing = new Parameter(this, "majorTickSpacing",
                new IntToken(10));
        majorTickSpacing.setTypeEquals(BaseType.INT);
        minorTickSpacing = new Parameter(this, "minorTickSpacing",
                new IntToken(1));
        minorTickSpacing.setTypeEquals(BaseType.INT);

        title = new StringAttribute(this, "title");
        title.setExpression("");
View Full Code Here

TOP

Related Classes of ptolemy.data.expr.Parameter

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.