Package ptolemy.math

Examples of ptolemy.math.Fraction.multiply()


        // Use entrySet here for performance reasons.
        for (Iterator actorMapEntries = entityToFiringsPerIteration.entrySet()
                .iterator(); actorMapEntries.hasNext();) {
            Map.Entry actors = (Map.Entry) actorMapEntries.next();
            Fraction repetitions = (Fraction) actors.getValue();
            repetitions = repetitions.multiply(lcmFraction);

            // FIXME: Doing the conversion to Integer here is bizarre,
            // since they are integers coming in.
            actors.setValue(Integer.valueOf(repetitions.getNumerator()));
        }
View Full Code Here


        // Use entrySet here for performance reasons.
        for (Iterator portMapEntries = externalRates.entrySet().iterator(); portMapEntries
                .hasNext();) {
            Map.Entry ports = (Map.Entry) portMapEntries.next();
            Fraction rate = (Fraction) ports.getValue();
            rate = rate.multiply(lcmFraction);

            // FIXME: Doing the conversion to Integer here is bizarre,
            // since they are integers coming in.
            ports.setValue(Integer.valueOf(rate.getNumerator()));
        }
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.