Package ptolemy.data.expr

Examples of ptolemy.data.expr.Parameter


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

        binWidth = new Parameter(this, "binWidth");
        binWidth.setExpression("1.0");
        binWidth.setTypeEquals(BaseType.DOUBLE);

        binOffset = new Parameter(this, "binOffset");
        binOffset.setExpression("0.5");
        binOffset.setTypeEquals(BaseType.DOUBLE);

        _attachText("_iconDescription", "<svg>\n"
                + "<rect x=\"-20\" y=\"-20\" " + "width=\"40\" height=\"40\" "
View Full Code Here


        _requestInitialization = true;

        double[][] one = { { 1.0 } };
        double[][] zero = { { 0.0 } };

        A = new Parameter(this, "A", new DoubleMatrixToken(one));
        A.setTypeEquals(BaseType.DOUBLE_MATRIX);

        B = new Parameter(this, "B", new DoubleMatrixToken(one));
        B.setTypeEquals(BaseType.DOUBLE_MATRIX);

        C = new Parameter(this, "C", new DoubleMatrixToken(one));
        C.setTypeEquals(BaseType.DOUBLE_MATRIX);

        D = new Parameter(this, "D", new DoubleMatrixToken(zero));
        D.setTypeEquals(BaseType.DOUBLE_MATRIX);

        initialStates = new Parameter(this, "initialStates",
                new DoubleMatrixToken(zero));
        initialStates.setTypeEquals(BaseType.DOUBLE_MATRIX);
        setClassName("ptolemy.domains.ct.lib.LinearStateSpace");

        // icon
View Full Code Here

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

        fillOnWrapup = new Parameter(this, "fillOnWrapup", new BooleanToken(
                true));
        fillOnWrapup.setTypeEquals(BaseType.BOOLEAN);

        legend = new StringAttribute(this, "legend");

View Full Code Here

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

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

     */
    public JAIConstant(CompositeEntity container, String name)
            throws IllegalActionException, NameDuplicationException {
        super(container, name);
        output.setTypeEquals(BaseType.OBJECT);
        width = new Parameter(this, "width", new IntToken(0));
        height = new Parameter(this, "height", new IntToken(0));
        bandValues = new Parameter(this, "bandValues", new ArrayToken(
                BaseType.INT, _defaultValues));
        dataFormat = new StringAttribute(this, "dataFormat");
        dataFormat.setExpression("byte");
        _dataFormat = _BYTE;
    }
View Full Code Here

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

        fileName.setExpression("file.bmp");

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

        control = new TypedIOPort(this, "control", true, false);
        control.setTypeEquals(BaseType.BOOLEAN);

        // The number of columns
        columns = new Parameter(this, "columns");
        columns.setExpression("10");
        rows = new Parameter(this, "rows");
        rows.setExpression("10");

        // Create the LED Array icon.
        _ledArray_icon = new EditorIcon(this, "_icon");
        _init();
View Full Code Here

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

        affineMatrix = new Parameter(this, "affineMatrix",
                new DoubleMatrixToken(_initialMatrix));

        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

        interpolationType.setExpression("bilinear");
        _interpolationType = _BILINEAR;

        output.setTypeEquals(BaseType.OBJECT);

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

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

    private void _init() throws IllegalActionException {
        try {
            input = new TypedIOPort(this, "input", true, false);
            modelString = new TypedIOPort(this, "modelString", true, false);
            modelString.setTypeEquals(BaseType.STRING);
            defaultValue = new Parameter(this, "defaultValue", new IntToken(0));
            output = new TypedIOPort(this, "output", false, true);
            output.setTypeAtLeast(defaultValue);
            refresh = new Parameter(this, "refresh", new BooleanToken(true));
            refresh.setTypeEquals(BaseType.BOOLEAN);
            connectPorts = new Parameter(this, "connectPorts",
                    new BooleanToken(true));
            connectPorts.setTypeEquals(BaseType.BOOLEAN);

            // create a defaultDirector. Without this director, it may get
            // an infinite loop when preinitialize, etc. is called in case the
            // specified director is not successfully constructed. Even when the
            // specified director is construced successfully, it cannot be removed
            // in wrapup() without this default director.
            //The default director may not work when we need multi tokens to fire
            //the inside model because the receiver it creates is an instance of
            //Mailbox, which can only hold one token. In this case, specify a proper
            //director using the <i>director<i> parameter.
            new Director(this, "defaultDirector");
            director = new Parameter(this, "director", new StringToken(
                    "ptolemy.actor.Director"));
            setClassName("ptolemy.actor.lib.hoc.MobileModel");
        } catch (NameDuplicationException e) {
            // This should not be thrown.
            throw new InternalErrorException(e);
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.