Package ptolemy.data

Examples of ptolemy.data.Token.zero()


            }
        } else if (attribute == values) {
            try {
                ArrayToken valuesArray = (ArrayToken)values.getToken();
                Token prototype = valuesArray.getElement(0);
                $ASSIGN$_zero(prototype.zero());
            } catch (ArrayIndexOutOfBoundsException ex) {
                throw new IllegalActionException(this, "Cannot set values to an empty array.");
            } catch (ClassCastException ex) {
                throw new IllegalActionException(this, "Cannot set values to something that is not an array: " + values.getToken());
            }
View Full Code Here


        for (int i = 0; i < minus.getWidth(); i++) {
            if (minus.hasToken(i)) {
                Token in = minus.get(i);

                if (sum == null) {
                    sum = in.zero();
                }

                sum = sum.subtract(in);
            }
        }
View Full Code Here

            }
        } else if (attribute == values) {
            try {
                ArrayToken valuesArray = (ArrayToken) values.getToken();
                Token prototype = valuesArray.getElement(0);
                _zero = prototype.zero();
            } catch (ArrayIndexOutOfBoundsException ex) {
                throw new IllegalActionException(this,
                        "Cannot set values to an empty array.");
            } catch (ClassCastException ex) {
                throw new IllegalActionException(this,
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.