Package ptolemy.data.type

Examples of ptolemy.data.type.ArrayType


        output = new TypedIOPort(this, "output", false, true);
        period = new Parameter(this, "period", new DoubleToken(2.0));
        period.setTypeEquals(BaseType.DOUBLE);
        offsets = new Parameter(this, "offsets");
        offsets.setExpression("{0.0, 1.0}");
        offsets.setTypeEquals(new ArrayType(BaseType.DOUBLE));
        attributeChanged(offsets);
        IntToken[] defaultValues = new IntToken[2];
        defaultValues[0] = new IntToken(1);
        defaultValues[1] = new IntToken(0);
        ArrayToken defaultValueToken = new ArrayToken(BaseType.INT, defaultValues);
View Full Code Here


     */
    public Pulse(CompositeEntity container, String name) throws NameDuplicationException, IllegalActionException  {
        super(container, name);
        indexes = new Parameter(this, "indexes");
        indexes.setExpression("{0, 1}");
        indexes.setTypeEquals(new ArrayType(BaseType.INT));
        attributeChanged(indexes);
        values = new Parameter(this, "values");
        values.setExpression("{1, 0}");
        repeat = new Parameter(this, "repeat", new BooleanToken(false));
        repeat.setTypeEquals(BaseType.BOOLEAN);
View Full Code Here

        timeConstant = new Parameter(this, "timeConstant");
        timeConstant.setExpression("1.0");
        timeConstant.setTypeEquals(BaseType.DOUBLE);
        timeConstant.validate();
        adaptedReflectionCoefficients = new TypedIOPort(this, "adaptedReflectionCoefficients", false, true);
        adaptedReflectionCoefficients.setTypeEquals(new ArrayType(BaseType.DOUBLE));
        output.setTypeAtLeast(input);
    }
View Full Code Here

    public ComputeHistogram(CompositeEntity container, String name) throws IllegalActionException, NameDuplicationException  {
        super(container, name);
        input = new TypedIOPort(this, "input", true, false);
        input.setTypeEquals(BaseType.DOUBLE);
        output = new TypedIOPort(this, "output", false, true);
        output.setTypeEquals(new ArrayType(BaseType.INT));
        minimumValue = new Parameter(this, "minimumValue");
        minimumValue.setExpression("0.0");
        minimumValue.setTypeEquals(BaseType.DOUBLE);
        maximumValue = new Parameter(this, "maximumValue");
        maximumValue.setExpression("1.0");
View Full Code Here

        input = new TypedIOPort(this, "input", true, false);
        peakValues = new TypedIOPort(this, "peakValues", false, true);
        peakIndices = new TypedIOPort(this, "peakIndices", false, true);
        (new SingletonParameter(peakValues, "_showName")).setToken(BooleanToken.TRUE);
        (new SingletonParameter(peakIndices, "_showName")).setToken(BooleanToken.TRUE);
        input.setTypeEquals(new ArrayType(BaseType.DOUBLE));
        peakValues.setTypeAtLeast(input);
        peakIndices.setTypeEquals(new ArrayType(BaseType.INT));
    }
View Full Code Here

     * @exception CloneNotSupportedException If a derived class contains
     * an attribute that cannot be cloned.
     */
    public Object clone(Workspace workspace) throws CloneNotSupportedException  {
        ArrayPeakSearch newObject = (ArrayPeakSearch)super.clone(workspace);
        newObject.input.setTypeEquals(new ArrayType(BaseType.DOUBLE));
        newObject.peakValues.setTypeAtLeast(newObject.input);
        return newObject;
    }
View Full Code Here

    public Interpolator(CompositeEntity container, String name) throws NameDuplicationException, IllegalActionException  {
        super(container, name);
        $ASSIGN$_interpolation(new Interpolation());
        indexes = new Parameter(this, "indexes");
        indexes.setExpression("{0, 1}");
        indexes.setTypeEquals(new ArrayType(BaseType.INT));
        attributeChanged(indexes);
        values = new Parameter(this, "values");
        values.setExpression("{1.0, 0.0}");
        values.setTypeEquals(new ArrayType(BaseType.DOUBLE));
        int defOrder = _interpolation.getOrder();
        IntToken defOrderToken = new IntToken(defOrder);
        order = new Parameter(this, "order", defOrderToken);
        order.setTypeEquals(BaseType.INT);
        int defPeriod = _interpolation.getPeriod();
View Full Code Here

        period.setExpression("2.0");
        period.setTypeEquals(BaseType.DOUBLE);

        offsets = new Parameter(this, "offsets");
        offsets.setExpression("{0.0, 1.0}");
        offsets.setTypeEquals(new ArrayType(BaseType.DOUBLE));

        // Call this so that we don't have to copy its code here...
        attributeChanged(offsets);

        // set the values parameter
View Full Code Here

        returnSocketNumber = new TypedIOPort(this, "returnSocketNumber");
        returnSocketNumber.setTypeEquals(BaseType.INT);
        returnSocketNumber.setOutput(true);

        output = new TypedIOPort(this, "output");
        output.setTypeEquals(new ArrayType(BaseType.UNSIGNED_BYTE));
        output.setOutput(true);

        trigger = new TypedIOPort(this, "trigger", true, false);
        trigger.setTypeEquals(BaseType.GENERAL);
        trigger.setMultiport(true);

        // parameters - Ordering here sets the order they show up in Vergil
        localSocketNumber = new Parameter(this, "localSocketNumber");
        localSocketNumber.setTypeEquals(BaseType.INT);
        localSocketNumber.setToken(new IntToken(4004));

        actorBufferLength = new Parameter(this, "actorBufferLength");
        actorBufferLength.setTypeEquals(BaseType.INT);
        actorBufferLength.setToken(new IntToken(440));

        platformBufferLength = new Parameter(this, "platformBufferLength");
        platformBufferLength.setTypeEquals(BaseType.INT);
        platformBufferLength.setToken(new IntToken(64));

        setPlatformBufferLength = new Parameter(this,
                "setPlatformBufferLength", new BooleanToken(false));
        setPlatformBufferLength.setTypeEquals(BaseType.BOOLEAN);

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

        blockAwaitingDatagram = new Parameter(this, "blockAwaitingDatagram");
        blockAwaitingDatagram.setTypeEquals(BaseType.BOOLEAN);
        blockAwaitingDatagram.setExpression("true");

        defaultReturnAddress = new Parameter(this, "defaultReturnAddress");
        defaultReturnAddress.setTypeEquals(BaseType.STRING);
        defaultReturnAddress.setToken(new StringToken("localhost"));

        defaultReturnSocketNumber = new Parameter(this,
                "defaultReturnSocketNumber");
        defaultReturnSocketNumber.setTypeEquals(BaseType.INT);
        defaultReturnSocketNumber.setExpression("0");

        defaultOutput = new Parameter(this, "defaultOutput");
        defaultOutput.setTypeEquals(new ArrayType(BaseType.UNSIGNED_BYTE));
        defaultOutput.setExpression("{0ub}");

        // Repeat has not been implemented.  However, I'd place it
        // here so that it would show up in Vergil below
        // <i>defaultOutput</i>.  It works in tandem with the above
View Full Code Here

        period.setExpression("2.0");
        period.setTypeEquals(BaseType.DOUBLE);

        offsets = new Parameter(this, "offsets");
        offsets.setExpression("{0.0, 1.0}");
        offsets.setTypeEquals(new ArrayType(BaseType.DOUBLE));

        // Call this so that we don't have to copy its code here...
        attributeChanged(offsets);

        // Set the values parameter.
View Full Code Here

TOP

Related Classes of ptolemy.data.type.ArrayType

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.