Package ptolemy.graph

Examples of ptolemy.graph.InequalityTerm


         *  element array containing the inequality term representing
         *  the type of the port; otherwise, return an empty array.
         *  @return An array of InequalityTerm.
         */
        public InequalityTerm[] getVariables() {
            InequalityTerm portTerm = input.getTypeTerm();

            if (portTerm.isSettable()) {
                InequalityTerm[] variable = new InequalityTerm[1];
                variable[0] = portTerm;
                return variable;
            }

View Full Code Here


         *  length.
         *  @return An array of InequalityTerm.
         */
        public InequalityTerm[] getVariables() {
            try {
                InequalityTerm elementTerm = ArrayType.elementType(taps);
                if (input.getTypeTerm().isSettable()
                        && elementTerm.isSettable()) {
                    InequalityTerm[] variable = new InequalityTerm[2];
                    variable[0] = input.getTypeTerm();
                    variable[1] = elementTerm;
                    return variable;
                } else if (elementTerm.isSettable()) {
                    InequalityTerm[] variable = new InequalityTerm[1];
                    variable[0] = elementTerm;
                    return variable;
                } else if (input.getTypeTerm().isSettable()) {
                    InequalityTerm[] variable = new InequalityTerm[1];
View Full Code Here

            try {
                NamedObj object = getDestination(name);

                if (object instanceof Typeable) {
                    InequalityTerm term = ((Typeable) object).getTypeTerm();
                    list.add(new Inequality(new TypeFunction(name), term));
                }
            } catch (Exception ex) {
                throw new RuntimeException(ex);
            }
View Full Code Here

                // (but not for UNKNOWN arguments), and to give good error
                // messages when functions are not found.
                InequalityTerm[] terms = getVariables();

                for (int i = 0; i < terms.length; i++) {
                    InequalityTerm term = terms[i];

                    if ((term != this) && (term.getValue() == BaseType.UNKNOWN)) {
                        return BaseType.UNKNOWN;
                    }
                }

                ASTPtRootNode parseTree = (ASTPtRootNode) _parseTrees
View Full Code Here

                        _scope);
                List termList = new LinkedList();

                for (Iterator elements = set.iterator(); elements.hasNext();) {
                    String name = (String) elements.next();
                    InequalityTerm term = _scope.getTypeTerm(name);

                    if ((term != null) && term.isSettable()) {
                        termList.add(term);
                    }
                }

                return (InequalityTerm[]) termList
View Full Code Here

         *  one array).  If both have been set, return an empty
         *  InequalityTerm array.
         *  @return An array of InequalityTerm.
         */
        public InequalityTerm[] getVariables() {
            InequalityTerm term1 = _port1.getTypeTerm();
            InequalityTerm term2 = _port2.getTypeTerm();

            if ((term1.isSettable()) && (term2.isSettable())) {
                InequalityTerm[] array = { term1, term2 };
                return array;
            } else if (term1.isSettable()) {
                InequalityTerm[] array = { term1 };
                return array;
            } else if (term2.isSettable()) {
                InequalityTerm[] array = { term2 };
                return array;
            }

            return (new InequalityTerm[0]);
View Full Code Here

                Iterator inequalities = ((TypeConflictException) throwable)
                        .inequalityList().iterator();
                while (inequalities.hasNext()) {
                    Inequality inequality = (Inequality) inequalities.next();
                    if (inequality != null) {
                        InequalityTerm term = inequality.getGreaterTerm();
                        if (term != null) {
                            Object object = term.getAssociatedObject();
                            if (object instanceof Nameable) {
                                _highlightError((Nameable) object);
                            }
                        }
                        term = inequality.getLesserTerm();
                        if (term != null) {
                            Object object = term.getAssociatedObject();
                            if (object instanceof Nameable) {
                                _highlightError((Nameable) object);
                            }
                        }
                    }
View Full Code Here

                        InequalityTerm[] greaterVariables = inequality
                                .getGreaterTerm().getVariables();
                        boolean added = false;

                        for (int i = 0; i < lesserVariables.length; i++) {
                            InequalityTerm variable = lesserVariables[i];

                            if (!variable.isValueAcceptable()) {
                                unacceptable.add(inequality);
                                added = true;
                                break;
                            }
                        }

                        if (added == false) {
                            for (int i = 0; i < greaterVariables.length; i++) {
                                InequalityTerm variable = greaterVariables[i];

                                if (!variable.isValueAcceptable()) {
                                    unacceptable.add(inequality);
                                    break;
                                }
                            }
                        }
View Full Code Here

        /** Delegate to the element type term of the associated typeable.
         *  @return a Type.
         *  @exception IllegalActionException If the delegate throws it.
         */
        public Object getValue() throws IllegalActionException {
            InequalityTerm term = _getElementTypeTerm();
            if (term == null) {
                return BaseType.UNKNOWN;
            } else {
                return term.getValue();
            }
        }
View Full Code Here

         @return an ArrayType.
         *  @param type A Type.
         *  @exception IllegalActionException If the delegate throws it.
         */
        public void initialize(Object type) throws IllegalActionException {
            InequalityTerm term = _getElementTypeTerm();
            if (term == null) {
                return;
            } else {
                term.initialize(type);
            }
        }
View Full Code Here

TOP

Related Classes of ptolemy.graph.InequalityTerm

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.