Examples of arrayValue()


Examples of ptolemy.data.ArrayToken.arrayValue()

        if (_outputRate == -1) {
            output.broadcast(result);
        } else {
            // FIXME: Check size.
            ArrayToken resultArray = (ArrayToken) result;
            output.broadcast(resultArray.arrayValue(), resultArray.length());
        }
    }

    /** Return true if the input ports have enough tokens.
     *  @exception IllegalActionException Not thrown in this base class.
View Full Code Here

Examples of ptolemy.data.ArrayToken.arrayValue()

     *   or if there is no director, or if runtime type conflicts occur.
     */
    public void fire() throws IllegalActionException {
        if (newTaps.hasToken(0)) {
            ArrayToken tapsToken = (ArrayToken) (newTaps.get(0));
            _taps = tapsToken.arrayValue();

            // Get a token representing zero in the appropriate type.
            _zero = _taps[0].zero();

            _reinitialize();
View Full Code Here

Examples of ptolemy.data.ArrayToken.arrayValue()

            }

            _reinitializeNeeded = true;
        } else if (attribute == taps) {
            ArrayToken tapsToken = (ArrayToken) (taps.getToken());
            _taps = tapsToken.arrayValue();

            // Get a token representing zero in the appropriate type.
            _zero = _taps[0].zero();

            _reinitializeNeeded = true;
View Full Code Here

Examples of ptolemy.data.ArrayToken.arrayValue()

                    + "number of elements in the input ArrayToken ("
                    + token.length() + ") is not the same as the arrayLength "
                    + "parameter (" + rate + ").");
        }

        Token[] elements = token.arrayValue();
        output.send(0, elements, elements.length);
    }

    /** Return the type constraint that the type of the output port is no
     *  less than the type of the elements of the input array.
View Full Code Here

Examples of ptolemy.data.ArrayToken.arrayValue()

    private void _arrayFire() throws IllegalActionException {
        ArrayToken token1 = (ArrayToken) input1.get(0);
        ArrayToken token2 = (ArrayToken) input2.get(0);

        Token[] array1 = token1.arrayValue();
        Token[] array2 = token2.arrayValue();

        if (array1.length != array2.length) {
            throw new IllegalActionException("Inputs to DotProduct have "
                    + "unequal lengths: " + array1.length + " and "
                    + array2.length + ".");
View Full Code Here

Examples of ptolemy.data.ArrayToken.arrayValue()

            throw new IllegalActionException(this, "Table parameter must "
                    + "have at least " + size + " entries, but only has "
                    + tableToken.length());
        }

        _table = tableToken.arrayValue();
    }

    ///////////////////////////////////////////////////////////////////
    ////                         private variables                 ////
    // Local cache of these parameter values.
View Full Code Here

Examples of ptolemy.data.ArrayToken.arrayValue()

     */
    public void attributeChanged(Attribute attribute)
            throws IllegalActionException {
        if (attribute == numerator) {
            ArrayToken numeratorValue = (ArrayToken) numerator.getToken();
            _numerator = numeratorValue.arrayValue();
        } else if (attribute == denominator) {
            ArrayToken denominatorValue = (ArrayToken) denominator.getToken();
            _denominator = denominatorValue.arrayValue();

            // Note: a<sub>0</sub> must always be 1.
View Full Code Here

Examples of ptolemy.data.ArrayToken.arrayValue()

        if (attribute == numerator) {
            ArrayToken numeratorValue = (ArrayToken) numerator.getToken();
            _numerator = numeratorValue.arrayValue();
        } else if (attribute == denominator) {
            ArrayToken denominatorValue = (ArrayToken) denominator.getToken();
            _denominator = denominatorValue.arrayValue();

            // Note: a<sub>0</sub> must always be 1.
            // Issue a warning if it isn't.
            if (!_denominator[0].isEqualTo(_denominator[0].one())
                    .booleanValue()) {
View Full Code Here

Examples of ptolemy.data.ArrayToken.arrayValue()

        if (myElementType.equals(argumentArrayToken.getElementType())) {
            return token;
        }

        Token[] argumentArray = argumentArrayToken.arrayValue();
        Token[] resultArray = new Token[argumentArray.length];

        try {
            for (int i = 0; i < argumentArray.length; i++) {
                resultArray[i] = myElementType.convert(argumentArray[i]);
View Full Code Here

Examples of ptolemy.data.ArrayToken.arrayValue()

        outputArrayLength.update();

        if (input.hasToken(0)) {
            ArrayToken inputValue = ((ArrayToken) input.get(0));
            Type inputElementType = inputValue.getElementType();
            Token[] inputArray = inputValue.arrayValue();
            int sourcePositionValue = ((IntToken) sourcePosition.getToken())
                    .intValue();
            int extractLengthValue = ((IntToken) extractLength.getToken())
                    .intValue();
            int destinationPositionValue = ((IntToken) destinationPosition
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.