Package ptolemy.data

Examples of ptolemy.data.IntToken


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

        output.setTypeEquals(BaseType.INT);

        n = new PortParameter(this, "n", new IntToken(1));
        n.setTypeEquals(BaseType.INT);
        new SingletonParameter(n.getPort(), "_showName")
                .setToken(BooleanToken.TRUE);

        p = new PortParameter(this, "p", new DoubleToken(0.5));
View Full Code Here


     */
    public void fire() throws IllegalActionException {
        n.update();
        p.update();
        super.fire();
        output.send(0, new IntToken(_current));
    }
View Full Code Here

     */
    public void fire() throws IllegalActionException {
        ro.update();
        pk.update();
        super.fire();
        output.send(0, new IntToken(_current));
    }
View Full Code Here

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

        output.setTypeEquals(BaseType.INT);

        n = new PortParameter(this, "n", new IntToken(1));
        n.setTypeEquals(BaseType.INT);
        new SingletonParameter(n.getPort(), "_showName")
                .setToken(BooleanToken.TRUE);

        p = new PortParameter(this, "p", new DoubleToken(0.5));
View Full Code Here

     */
    public void fire() throws IllegalActionException {
        n.update();
        p.update();
        super.fire();
        output.send(0, new IntToken(_current));
    }
View Full Code Here

        input.setTypeEquals(BaseType.OBJECT);
        outputX.setTypeEquals(BaseType.DOUBLE);
        outputY.setTypeEquals(BaseType.DOUBLE);

        /** The default values correspond to the color green */
        yLowValue = new Parameter(this, "yLowValue", new IntToken("110"));
        yHighValue = new Parameter(this, "yHighValue", new IntToken("210"));
        uLowValue = new Parameter(this, "uLowValue", new IntToken("85"));
        uHighValue = new Parameter(this, "uHighValue", new IntToken("110"));
        vLowValue = new Parameter(this, "vLowValue", new IntToken("120"));
        vHighValue = new Parameter(this, "vHighValue", new IntToken("130"));
    }
View Full Code Here

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

        trials = new PortParameter(this, "trials", new IntToken(1));
        trials.setTypeEquals(BaseType.INT);

        populations = new TypedIOPort(this, "populations", true, false);
        populations.setMultiport(true);
        populations.setTypeEquals(BaseType.LONG);
View Full Code Here

                    selected = trialsRemaining;
                }
                ;
            }

            _current[i] = new IntToken(selected);

            trialsRemaining -= selected;
            sourcePool -= sourceValues[i];
        }
    }
View Full Code Here

        Token result = null;

        if (A.hasToken(0) && B.hasToken(0)) {
            int opcode = Integer.parseInt(operation.getExpression().substring(
                    0, 1));
            IntToken tokenA = (IntToken) A.get(0);
            IntToken tokenB = (IntToken) B.get(0);

            switch (opcode) {
            case 0: // NOP
                result = IntToken.ZERO;
                break;
View Full Code Here

            for (int i = 1; i < token.length(); i++) {
                sum = sum.add(token.getElement(i));
            }

            output.send(0, sum.divide(new IntToken(token.length())));
        }
    }
View Full Code Here

TOP

Related Classes of ptolemy.data.IntToken

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.