Package ptolemy.data.expr

Examples of ptolemy.data.expr.Parameter


     */
    public CTPeriodicSampler(CompositeEntity container, String name)
            throws IllegalActionException, NameDuplicationException {
        super(container, name);
        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


        // Create the input port and make it a multiport.
        x = new TypedIOPort(this, "x", true, false);
        x.setMultiport(true);
        x.setTypeEquals(BaseType.DOUBLE);
        x.setTypeEquals(new ArrayType(BaseType.DOUBLE));
        new Parameter(x, "_showName", BooleanToken.TRUE);

        y = new TypedIOPort(this, "y", true, false);
        y.setMultiport(true);
        y.setTypeEquals(BaseType.DOUBLE);
        y.setTypeEquals(new ArrayType(BaseType.DOUBLE));
        new Parameter(y, "_showName", BooleanToken.TRUE);

        iterationsPerUpdate = new Parameter(this, "iterationsPerUpdate");
        iterationsPerUpdate.setExpression("1");
    }
View Full Code Here

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

        specifySize = new Parameter(this, "specifySize");
        specifySize.setTypeEquals(BaseType.BOOLEAN);
        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;

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

        input.setTypeEquals(BaseType.OBJECT);
        output.setTypeEquals(BaseType.OBJECT);
    }
View Full Code Here

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

        xOrigin = new Parameter(this, "xOrigin", new IntToken(0));
        yOrigin = new Parameter(this, "yOrigin", new IntToken(0));

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

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

        startingDataset = new Parameter(this, "startingDataset",
                new IntToken(0));
        startingDataset.setTypeEquals(BaseType.INT);
    }
View Full Code Here

        super(container, name);
        input.setTypeEquals(BaseType.OBJECT);

        fileName = new FileParameter(this, "fileName");

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

        output = new TypedIOPort(this, "output", false, true);
        output.setTypeEquals(BaseType.DOUBLE);

        // Create the parameters.
        length = new Parameter(this, "length", new IntToken(100));
        length.setTypeEquals(BaseType.INT);

        // The initial trace is used to make the sketched value
        // persistent, and also to provide an initial trace when
        // an instance of the actor is first dragged onto a model.
        initialTrace = new Parameter(this, "initialTrace");
        initialTrace.setExpression("repeat(length, 0.0)");
        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);

        // Fill on wrapup no longer makes sense.
        // NOTE: This gets overridden with zero if the MoML file
        // gives the value of this variable.  Hence, we need to
        // reset later as well.
        fillOnWrapup.setToken(BooleanToken.FALSE);
        fillOnWrapup.setVisibility(Settable.NONE);

        // Starting data set for producing plots is now always 1.
        // NOTE: This gets overridden with zero if the MoML file
        // gives the value of this variable.  Hence, we need to
        // reset later as well.
        startingDataset.setToken(_one);
        startingDataset.setVisibility(Settable.NONE);

        // Set the initial token production parameter of the
        // output port so that this can be used in SDF in feedback
        // loops.
        Parameter tokenInitProduction = new Parameter(output,
                "tokenInitProduction");

        // Use an expression here so change propagate.
        tokenInitProduction.setExpression("length");
    }
View Full Code Here

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

        // set the parameters
        persistence = new Parameter(this, "persistence", new IntToken(100));
        persistence.setTypeEquals(BaseType.INT);
    }
View Full Code Here

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

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

            throws IllegalActionException, NameDuplicationException {
        super(container, name);
        input.setTypeEquals(BaseType.DOUBLE_MATRIX);
        output.setTypeEquals(BaseType.DOUBLE_MATRIX);

        maxWindowSize = new Parameter(this, "maxWindowSize", new IntToken(7));
    }
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.