Package ptolemy.data

Examples of ptolemy.data.Token


                if (!(port instanceof ParameterPort)) {
                    Receiver[][] insideReceivers = port.deepGetReceivers();
                    for (int i = 0; i < port.getWidth(); i++) {
                        if (port.hasToken(i)) {
                            Token token = port.get(i);
                            if ((insideReceivers != null)
                                    && (insideReceivers[i] != null)) {
                                for (int j = 0; j < insideReceivers[i].length; j++) {
                                    if (insideReceivers[i][j].getContainer()
                                            .getContainer() == refinement) {
View Full Code Here


            }

            i++;
        }

        Token result = functionValue.apply(arguments);

        if (_outputRate == -1) {
            output.broadcast(result);
        } else {
            // FIXME: Check size.
View Full Code Here

     *   evaluation.
     */
    public Token evaluateParseTree(ASTPtRootNode node, ParserScope scope)
            throws IllegalActionException {
        _relationIndex = 0;
        Token result = super.evaluateParseTree(node, scope);
        if (_constructingRelationList) {
            _constructingRelationList = false;
        }
        return result;
    }
View Full Code Here

        if (token == null) {
            token = _dummy;
        }

        Token[] values = { properties, token };
        Token result = null;

        try {
            result = new RecordToken(labels, values);
        } catch (IllegalActionException e) {
            // Should not occur since we've ensured above that
View Full Code Here

     *
     *  @exception IllegalActionException Not thrown in this base class.
     */
    public boolean postfire() throws IllegalActionException {
        if (input.hasToken(0)) {
            Token token = input.get(0);
            System.out.println(token.toString());
        }

        return super.postfire();
    }
View Full Code Here

        int errorDelayValue = ((IntToken) errorDelay.getToken()).intValue();
        int decimationValue = ((IntToken) decimation.getToken()).intValue();
        int decimationPhaseValue = ((IntToken) decimationPhase.getToken())
                .intValue();
        int index = (errorDelayValue * decimationValue) + decimationPhaseValue;
        Token factor = error.get(0).multiply(stepSize.getToken());

        for (int i = 0; i < _taps.length; i++) {
            // The data item to use here should be "index" in the past,
            // where an index of zero would be the current input.
            Token datum = _data[((_mostRecent + index) - 1) % _data.length];
            _taps[i] = _taps[i].add(factor.multiply(datum));
            index++;
        }

        // Update the tapValues output.
View Full Code Here

    public void attributeChanged(Attribute attribute)
            throws IllegalActionException {
        // NOTE: Invalidate the schedules only if the values of these
        // parameters have changed.
        if (attribute == allowDisconnectedGraphs) {
            Token token = allowDisconnectedGraphs.getToken();
            boolean newValue = ((BooleanToken) token).booleanValue();
            if (newValue != _allowDisconnectedGraphs) {
                _allowDisconnectedGraphs = newValue;
                invalidateSchedule();
            }
        } else if (attribute == vectorizationFactor) {
            Token token = vectorizationFactor.getToken();
            int newValue = ((IntToken) token).intValue();
            if (newValue != _vectorizationFactor) {
                _vectorizationFactor = newValue;
                invalidateSchedule();
            }
View Full Code Here

            for (int i = 0; i < port.getWidthInside(); i++) {
                try {
                    for (int k = 0; k < rate; k++) {
                        if (port.hasTokenInside(i)) {
                            Token t = port.getInside(i);

                            if (_debugging) {
                                _debug(getName(), "transferring output from "
                                        + port.getName());
                            }
View Full Code Here

        for (int i = 0; i < port.getWidth(); i++) {
            try {
                if (i < port.getWidthInside()) {
                    for (int k = 0; k < rate; k++) {
                        if (port.hasToken(i)) {
                            Token t = port.get(i);

                            if (_debugging) {
                                _debug(getName(), "transferring input from "
                                        + port.getName());
                            }
View Full Code Here

        for (int i = 0; i < port.getWidthInside(); i++) {
            try {
                for (int k = 0; k < rate; k++) {
                    if (port.hasTokenInside(i)) {
                        Token t = port.getInside(i);

                        if (_debugging) {
                            _debug(getName(), "transferring output from "
                                    + port.getName());
                        }
View Full Code Here

TOP

Related Classes of ptolemy.data.Token

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.