Package ptolemy.graph

Examples of ptolemy.graph.CPO


                return BaseType.UNKNOWN;
            } else if ((type1 instanceof ArrayType)
                    && (type2 instanceof ArrayType)) {
                Type elType1 = ((ArrayType) type1).getElementType();
                Type elType2 = ((ArrayType) type2).getElementType();
                CPO lattice = TypeLattice.lattice();
                return lattice.leastUpperBound(elType1, elType2);
            } else if ((type1 instanceof MatrixType)
                    && (type2 instanceof MatrixType)) {
                Type elType1 = ((MatrixType) type1).getElementType();
                Type elType2 = ((MatrixType) type2).getElementType();
                CPO lattice = TypeLattice.lattice();
                return lattice.leastUpperBound(elType1, elType2);
            } else {
                return BaseType.UNKNOWN;
            }
        }
View Full Code Here


                            }
                        }
                    }
                }

                CPO lattice = TypeLattice.lattice();
                Object[] portTypeArray = portTypeList.toArray();
                result = (Type) lattice.greatestLowerBound(portTypeArray);
            } else if (isOutput()) {
                // is a transparent output port. Get all the ports connected
                // on the inside through deepInsidePortList().
                Iterator ports = deepInsidePortList().iterator();
                List portTypeList = new LinkedList();

                while (ports.hasNext()) {
                    TypedIOPort port = (TypedIOPort) ports.next();

                    // Rule out case where this port itself is listed...
                    if ((port != this) && port.isOutput()) {
                        portTypeList.add(port.getType());
                    }
                }

                CPO lattice = TypeLattice.lattice();
                Object[] portTypeArray = portTypeList.toArray();
                result = (Type) lattice.leastUpperBound(portTypeArray);
            }

            return result;
        } finally {
            _workspace.doneReading();
View Full Code Here

             System.out.println(constraintsIterator.next().toString());
             }
             */

            if (constraintList.size() > 0) {
                CPO cpo = TypeLattice.lattice();
                InequalitySolver solver = new InequalitySolver(cpo);
                Iterator constraints = constraintList.iterator();

                solver.addInequalities(constraints);

View Full Code Here

TOP

Related Classes of ptolemy.graph.CPO

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.