Package ptolemy.data

Examples of ptolemy.data.BooleanToken


            // Reset the index to start at the beginning of the
            // new sequence.
            _index = 0;
        }

        output.broadcast(new BooleanToken(_row[_index]));

        _index++;

        if (_index >= _row.length) {
            _index = 0;
View Full Code Here


        }

        int eIndex = _index[eValue];

        if (eIndex < _uncodeSizeValue) {
            input[eIndex] = new BooleanToken(!input[eIndex].booleanValue());
        }

        output.broadcast(input, _uncodeSizeValue);
    }
View Full Code Here

        }

        BooleanToken[] result = new BooleanToken[_wordLength];

        for (int i = 0; i < _wordLength; i++) {
            result[i] = new BooleanToken((index & 1) == 1);
            index = index >> 1;
        }

        output.broadcast(result, _wordLength);
    }
View Full Code Here

                // Generate code to reinitialize the target state, if
                // reset is true.
                TypedActor[] refinements = null;

                try {
                    BooleanToken resetToken = (BooleanToken) transition.reset
                            .getToken();

                    if (resetToken.booleanValue()) {
                        refinements = (transition.destinationState())
                                .getRefinement();
                    }
                } catch (Exception ex) {
                    throw new RuntimeException(ex.getMessage());
View Full Code Here

    public void fire() throws IllegalActionException {
        super.fire();
        _latestShiftReg = _shiftReg;

        int mask = ((IntToken) polynomial.getToken()).intValue();
        BooleanToken inputToken = ((BooleanToken) input.get(0));
        boolean inputTokenValue = inputToken.booleanValue();
        int reg = _latestShiftReg << 1;

        // Put the input in the low-order bit.
        reg = reg ^ (inputTokenValue ? 1 : 0);
View Full Code Here

            }
        }

        // Send the parity results to the output.
        for (int i = 0; i < _order; i++) {
            result[i + _uncodeSizeValue] = new BooleanToken((parity[i] == 1));
        }

        output.broadcast(result, result.length);
    }
View Full Code Here

        if ((tokens == null) || (_lengthOfOutput != tokens.length)) {
            _outputs = new Token[_lengthOfOutput];
        }

        BooleanToken booleantoken = new BooleanToken(false);
        BaseType.BooleanType booleantype = BaseType.BOOLEAN;
        token_12_ = booleantype.convert(booleantoken);

        BooleanToken booleantoken_13_ = (BooleanToken) token_12_;
        biased_CGToken = booleantoken_13_;
        booleantoken = new BooleanToken(true);
        booleantype = BaseType.BOOLEAN;
        token_12_ = booleantype.convert(booleantoken);
        booleantoken_13_ = (BooleanToken) token_12_;
        symmetricOutput_CGToken = booleantoken_13_;
        _numberOfInputs = 10;
View Full Code Here

        function.addChoice("contains");
        _function = _EQUALS;

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

        // Ports
        firstString = new PortParameter(this, "firstString");
        firstString.setExpression("");
        firstString.setStringMode(true);
View Full Code Here

        if (((BooleanToken) ignoreCase.getToken()).booleanValue()) {
            input1 = input1.toLowerCase();
            input2 = input2.toLowerCase();
        }

        output.send(0, new BooleanToken(_doFunction(input1, input2)));
    }
View Full Code Here

        matchString.update();

        String matchStringValue = ((StringToken) matchString.getToken())
                .stringValue();
        Matcher match = _pattern.matcher(matchStringValue);
        output.send(0, new BooleanToken(match.find()));
    }
View Full Code Here

TOP

Related Classes of ptolemy.data.BooleanToken

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.